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