2015-01-27 01:03:25 +01:00
|
|
|
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
2015-01-31 01:55:56 +01:00
|
|
|
#ifndef CEF_TESTS_CEFCLIENT_BROWSER_BROWSER_WINDOW_STD_WIN_H_
|
|
|
|
#define CEF_TESTS_CEFCLIENT_BROWSER_BROWSER_WINDOW_STD_WIN_H_
|
|
|
|
#pragma once
|
2015-01-27 01:03:25 +01:00
|
|
|
|
2015-01-31 01:55:56 +01:00
|
|
|
#include "cefclient/browser/browser_window.h"
|
2015-01-27 01:03:25 +01:00
|
|
|
|
|
|
|
namespace client {
|
|
|
|
|
|
|
|
// Represents a native child window hosting a single windowed browser instance.
|
|
|
|
// The methods of this class must be called on the main thread unless otherwise
|
|
|
|
// indicated.
|
2015-01-29 21:53:53 +01:00
|
|
|
class BrowserWindowStdWin : public BrowserWindow {
|
2015-01-27 01:03:25 +01:00
|
|
|
public:
|
|
|
|
// Constructor may be called on any thread.
|
|
|
|
// |delegate| must outlive this object.
|
|
|
|
BrowserWindowStdWin(Delegate* delegate,
|
|
|
|
const std::string& startup_url);
|
|
|
|
|
2015-01-29 21:53:53 +01:00
|
|
|
// BrowserWindow methods.
|
|
|
|
void CreateBrowser(ClientWindowHandle parent_handle,
|
|
|
|
const CefRect& rect,
|
2015-01-27 01:03:25 +01:00
|
|
|
const CefBrowserSettings& settings) OVERRIDE;
|
2015-01-29 21:53:53 +01:00
|
|
|
void GetPopupConfig(CefWindowHandle temp_handle,
|
2015-01-27 01:03:25 +01:00
|
|
|
CefWindowInfo& windowInfo,
|
|
|
|
CefRefPtr<CefClient>& client,
|
|
|
|
CefBrowserSettings& settings) OVERRIDE;
|
2015-01-29 21:53:53 +01:00
|
|
|
void ShowPopup(ClientWindowHandle parent_handle,
|
2015-01-27 01:03:25 +01:00
|
|
|
int x, int y, size_t width, size_t height) OVERRIDE;
|
|
|
|
void Show() OVERRIDE;
|
|
|
|
void Hide() OVERRIDE;
|
|
|
|
void SetBounds(int x, int y, size_t width, size_t height) OVERRIDE;
|
2015-01-30 19:07:13 +01:00
|
|
|
void SetFocus(bool focus) OVERRIDE;
|
2015-01-29 21:53:53 +01:00
|
|
|
ClientWindowHandle GetWindowHandle() const OVERRIDE;
|
2015-01-27 01:03:25 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(BrowserWindowStdWin);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace client
|
|
|
|
|
2015-01-31 01:55:56 +01:00
|
|
|
#endif // CEF_TESTS_CEFCLIENT_BROWSER_BROWSER_WINDOW_STD_WIN_H_
|