• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2016 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_WINDOW_TEST_RUNNER_H_
6 #define CEF_TESTS_CEFCLIENT_BROWSER_WINDOW_TEST_RUNNER_H_
7 #pragma once
8 
9 #include "include/cef_browser.h"
10 
11 namespace client {
12 namespace window_test {
13 
14 // Implement this interface for different platforms. Methods will be called on
15 // the browser process UI thread unless otherwise indicated.
16 class WindowTestRunner {
17  public:
18   virtual void SetPos(CefRefPtr<CefBrowser> browser,
19                       int x,
20                       int y,
21                       int width,
22                       int height) = 0;
23   virtual void Minimize(CefRefPtr<CefBrowser> browser) = 0;
24   virtual void Maximize(CefRefPtr<CefBrowser> browser) = 0;
25   virtual void Restore(CefRefPtr<CefBrowser> browser) = 0;
26 
27   // Fit |window| inside |display|. Coordinates are relative to the upper-left
28   // corner of the display.
29   static void ModifyBounds(const CefRect& display, CefRect& window);
30 
~WindowTestRunner()31   virtual ~WindowTestRunner() {}
32 };
33 
34 }  // namespace window_test
35 }  // namespace client
36 
37 #endif  // CEF_TESTS_CEFCLIENT_BROWSER_WINDOW_TEST_RUNNER_H_
38