diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-05 00:58:06 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-05 00:58:06 +0000 |
commit | a55bfd3d8f23c22003cf6a0754aa320fe7b7d3e4 (patch) | |
tree | f90c20acb5701e17d66fabfce5ca90c827ca9c2e /chrome/browser/find_bar_host_browsertest.cc | |
parent | bd205617c4f7eca4bb28c0343ed2f071189393c3 (diff) | |
download | chromium_src-a55bfd3d8f23c22003cf6a0754aa320fe7b7d3e4.zip chromium_src-a55bfd3d8f23c22003cf6a0754aa320fe7b7d3e4.tar.gz chromium_src-a55bfd3d8f23c22003cf6a0754aa320fe7b7d3e4.tar.bz2 |
Add cross platform Widget::InitWithWidget(parent, const gfx::Rect& bounds);
On linux, native parent has to be either window_contents or widget depending of the type of wiget. InitWithWidget takes a parent Widget instead of native and hides these details.
I also cleaned up a few dead/duplicated code.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2355003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48990 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/find_bar_host_browsertest.cc')
-rw-r--r-- | chrome/browser/find_bar_host_browsertest.cc | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/chrome/browser/find_bar_host_browsertest.cc b/chrome/browser/find_bar_host_browsertest.cc index 2473128..9ffaf72 100644 --- a/chrome/browser/find_bar_host_browsertest.cc +++ b/chrome/browser/find_bar_host_browsertest.cc @@ -732,23 +732,9 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, GURL url = server->TestServerPage(kSimplePage); ui_test_utils::NavigateToURL(browser(), url); -#if defined(OS_WIN) - // TODO(oshima): Windows code assumes that NativeView is - // assignable from NativeWindow, which is not true on other platforms. - // This has to be fixed, probably by having explicit - // GetNativeView / GetNativewWindow methods on BrowserWindow. - // See http://crbug.com/26873. - gfx::NativeView browser_view = browser()->window()->GetNativeHandle(); -#elif defined(OS_LINUX) - gfx::NativeView browser_view = - GTK_WIDGET(browser()->window()->GetNativeHandle()); -#else - // Mac does not use views. - NOTREACHED(); -#endif - views::FocusManager* focus_manager = - views::FocusManager::GetFocusManagerForNativeView(browser_view); + views::FocusManager::GetFocusManagerForNativeWindow( + browser()->window()->GetNativeHandle()); // See where Escape is registered. views::Accelerator escape(base::VKEY_ESCAPE, false, false, false); |