cefclient: Simplify TempWindow usage (issue #1500).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2009 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2015-01-30 19:08:53 +00:00
parent 50380c7be4
commit c6f8c63a45
6 changed files with 39 additions and 21 deletions

View File

@ -191,6 +191,7 @@
'tests/cefclient/root_window_manager.h',
'tests/cefclient/scheme_test.cc',
'tests/cefclient/scheme_test.h',
'tests/cefclient/temp_window.h',
'tests/cefclient/test_runner.cc',
'tests/cefclient/test_runner.h',
'tests/cefclient/window_test.cc',

View File

@ -18,7 +18,7 @@
#include "cefclient/client_switches.h"
#include "cefclient/main_message_loop.h"
#include "cefclient/resource.h"
#include "cefclient/temp_window_x11.h"
#include "cefclient/temp_window.h"
namespace client {
@ -131,7 +131,7 @@ void RootWindowGtk::InitAsPopup(RootWindow::Delegate* delegate,
// The new popup is initially parented to a temporary window. The native root
// window will be created after the browser is created and the popup window
// will be re-parented to it at that time.
browser_window_->GetPopupConfig(TempWindowX11::GetWindowHandle(),
browser_window_->GetPopupConfig(TempWindow::GetWindowHandle(),
windowInfo, client, settings);
}

View File

@ -11,7 +11,7 @@
#include "cefclient/browser_window_std_mac.h"
#include "cefclient/client_switches.h"
#include "cefclient/main_message_loop.h"
#include "cefclient/temp_window_mac.h"
#include "cefclient/temp_window.h"
// Receives notifications from controls and the browser window. Will delete
// itself when done.
@ -310,7 +310,7 @@ void RootWindowMac::InitAsPopup(RootWindow::Delegate* delegate,
// The new popup is initially parented to a temporary window. The native root
// window will be created after the browser is created and the popup window
// will be re-parented to it at that time.
browser_window_->GetPopupConfig(TempWindowMac::GetWindowHandle(),
browser_window_->GetPopupConfig(TempWindow::GetWindowHandle(),
windowInfo, client, settings);
}

View File

@ -10,14 +10,7 @@
#include "include/base/cef_scoped_ptr.h"
#include "include/cef_command_line.h"
#include "cefclient/root_window.h"
#if defined(OS_WIN)
#include "cefclient/temp_window_win.h"
#elif defined(OS_LINUX)
#include "cefclient/temp_window_x11.h"
#elif defined(OS_MACOSX)
#include "cefclient/temp_window_mac.h"
#endif
#include "cefclient/temp_window.h"
namespace client {
@ -81,13 +74,7 @@ class RootWindowManager : public RootWindow::Delegate {
RootWindowSet root_windows_;
// Singleton window used as the temporary parent for popup browsers.
#if defined(OS_WIN)
TempWindowWin temp_window_win_;
#elif defined(OS_LINUX)
TempWindowX11 temp_window_x11_;
#elif defined(OS_MACOSX)
TempWindowMac temp_window_mac_;
#endif
TempWindow temp_window_;
DISALLOW_COPY_AND_ASSIGN(RootWindowManager);
};

View File

@ -11,7 +11,7 @@
#include "cefclient/client_switches.h"
#include "cefclient/main_message_loop.h"
#include "cefclient/resource.h"
#include "cefclient/temp_window_win.h"
#include "cefclient/temp_window.h"
#include "cefclient/util_win.h"
#define MAX_URL_LENGTH 255
@ -134,7 +134,7 @@ void RootWindowWin::InitAsPopup(RootWindow::Delegate* delegate,
// The new popup is initially parented to a temporary window. The native root
// window will be created after the browser is created and the popup window
// will be re-parented to it at that time.
browser_window_->GetPopupConfig(TempWindowWin::GetWindowHandle(),
browser_window_->GetPopupConfig(TempWindow::GetWindowHandle(),
windowInfo, client, settings);
}

View File

@ -0,0 +1,30 @@
// 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.
#ifndef CEF_TESTS_CEFCLIENT_TEMP_WINDOW_H_
#define CEF_TESTS_CEFCLIENT_TEMP_WINDOW_H_
#include "cefclient/client_types.h"
#if defined(OS_WIN)
#include "cefclient/temp_window_win.h"
#elif defined(OS_LINUX)
#include "cefclient/temp_window_x11.h"
#elif defined(OS_MACOSX)
#include "cefclient/temp_window_mac.h"
#endif
namespace client {
#if defined(OS_WIN)
typedef TempWindowWin TempWindow;
#elif defined(OS_LINUX)
typedef TempWindowX11 TempWindow;
#elif defined(OS_MACOSX)
typedef TempWindowMac TempWindow;
#endif
} // namespace client
#endif // CEF_TESTS_CEFCLIENT_TEMP_WINDOW_H_