From 0de6bd3689c9a2790ddb013ca5f761798aafdc40 Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Tue, 26 May 2009 20:25:29 +0000 Subject: Fixes BrowserView::GetBrowserViewForNativeView on linux. BUG=none TEST=none Review URL: http://codereview.chromium.org/113851 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16901 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/frame/browser_view.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'chrome/browser/views/frame') diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index af38dd7..17720d9 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -80,7 +80,11 @@ static const int kStatusBubbleHeight = 20; static const int kSeparationLineHeight = 1; // The name of a key to store on the window handle so that other code can // locate this object using just the handle. +#if defined(OS_WIN) static const wchar_t* kBrowserViewKey = L"__BROWSER_VIEW__"; +#else +static const char* kBrowserViewKey = "__BROWSER_VIEW__"; +#endif // How frequently we check for hung plugin windows. static const int kDefaultHungPluginDetectFrequency = 2000; // How long do we wait before we consider a window hung (in ms). @@ -305,8 +309,8 @@ BrowserView* BrowserView::GetBrowserViewForNativeView(gfx::NativeView window) { } #else if (window) { - return reinterpret_cast( - g_object_set_data(G_OBJECT(window), kBrowserViewKey, this)); + return static_cast( + g_object_get_data(G_OBJECT(window), kBrowserViewKey)); } #endif return NULL; -- cgit v1.1