• 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_TEMP_WINDOW_WIN_H_
6 #define CEF_TESTS_CEFCLIENT_BROWSER_TEMP_WINDOW_WIN_H_
7 #pragma once
8 
9 #include "include/cef_base.h"
10 
11 namespace client {
12 
13 // Represents a singleton hidden window that acts as a temporary parent for
14 // popup browsers. Only accessed on the UI thread.
15 class TempWindowWin {
16  public:
17   // Returns the singleton window handle.
18   static CefWindowHandle GetWindowHandle();
19 
20  private:
21   // A single instance will be created/owned by RootWindowManager.
22   friend class RootWindowManager;
23   // Allow deletion via std::unique_ptr only.
24   friend std::default_delete<TempWindowWin>;
25 
26   TempWindowWin();
27   ~TempWindowWin();
28 
29   CefWindowHandle hwnd_;
30 
31   DISALLOW_COPY_AND_ASSIGN(TempWindowWin);
32 };
33 
34 }  // namespace client
35 
36 #endif  // CEF_TESTS_CEFCLIENT_BROWSER_TEMP_WINDOW_WIN_H_
37