summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 20:25:29 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 20:25:29 +0000
commit0de6bd3689c9a2790ddb013ca5f761798aafdc40 (patch)
treef2f161c94c013e391eacf52a16e3c6b1e07d519b
parent361e7ea2b78410c3e18694ef570bddf584ce4400 (diff)
downloadchromium_src-0de6bd3689c9a2790ddb013ca5f761798aafdc40.zip
chromium_src-0de6bd3689c9a2790ddb013ca5f761798aafdc40.tar.gz
chromium_src-0de6bd3689c9a2790ddb013ca5f761798aafdc40.tar.bz2
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
-rw-r--r--chrome/browser/views/frame/browser_view.cc8
1 files changed, 6 insertions, 2 deletions
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<BrowserView*>(
- g_object_set_data(G_OBJECT(window), kBrowserViewKey, this));
+ return static_cast<BrowserView*>(
+ g_object_get_data(G_OBJECT(window), kBrowserViewKey));
}
#endif
return NULL;