• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 
5 #ifndef CEF_TESTS_CEFCLIENT_BROWSER_BROWSER_WINDOW_STD_WIN_H_
6 #define CEF_TESTS_CEFCLIENT_BROWSER_BROWSER_WINDOW_STD_WIN_H_
7 #pragma once
8 
9 #include "tests/cefclient/browser/browser_window.h"
10 
11 namespace client {
12 
13 // Represents a native child window hosting a single windowed browser instance.
14 // The methods of this class must be called on the main thread unless otherwise
15 // indicated.
16 class BrowserWindowStdWin : public BrowserWindow {
17  public:
18   // Constructor may be called on any thread.
19   // |delegate| must outlive this object.
20   BrowserWindowStdWin(Delegate* delegate, const std::string& startup_url);
21 
22   // BrowserWindow methods.
23   void CreateBrowser(ClientWindowHandle parent_handle,
24                      const CefRect& rect,
25                      const CefBrowserSettings& settings,
26                      CefRefPtr<CefDictionaryValue> extra_info,
27                      CefRefPtr<CefRequestContext> request_context) override;
28   void GetPopupConfig(CefWindowHandle temp_handle,
29                       CefWindowInfo& windowInfo,
30                       CefRefPtr<CefClient>& client,
31                       CefBrowserSettings& settings) override;
32   void ShowPopup(ClientWindowHandle parent_handle,
33                  int x,
34                  int y,
35                  size_t width,
36                  size_t height) override;
37   void Show() override;
38   void Hide() override;
39   void SetBounds(int x, int y, size_t width, size_t height) override;
40   void SetFocus(bool focus) override;
41   ClientWindowHandle GetWindowHandle() const override;
42 
43  private:
44   DISALLOW_COPY_AND_ASSIGN(BrowserWindowStdWin);
45 };
46 
47 }  // namespace client
48 
49 #endif  // CEF_TESTS_CEFCLIENT_BROWSER_BROWSER_WINDOW_STD_WIN_H_
50