diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-08 01:54:05 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-08 01:54:05 +0000 |
commit | 65d9442f844b98fdf0db7573f8d9500574146ddf (patch) | |
tree | 0d3bf70cf506e976fc9fed3b7f9b7d368c3513cd | |
parent | a6c2d2fc4f01928e978b0437cef8546bb0a4ab92 (diff) | |
download | chromium_src-65d9442f844b98fdf0db7573f8d9500574146ddf.zip chromium_src-65d9442f844b98fdf0db7573f8d9500574146ddf.tar.gz chromium_src-65d9442f844b98fdf0db7573f8d9500574146ddf.tar.bz2 |
Fix toolkit_views build
Review URL: http://codereview.chromium.org/375021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31397 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/tabs/tab_strip_2.cc | 6 | ||||
-rw-r--r-- | views/widget/widget_gtk.cc | 9 | ||||
-rw-r--r-- | views/widget/widget_gtk.h | 4 |
3 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/views/tabs/tab_strip_2.cc b/chrome/browser/views/tabs/tab_strip_2.cc index 12296eb..626a78d 100644 --- a/chrome/browser/views/tabs/tab_strip_2.cc +++ b/chrome/browser/views/tabs/tab_strip_2.cc @@ -49,7 +49,7 @@ bool TabStrip2::Enabled() { // static TabStrip2* TabStrip2::GetTabStripFromWindow(gfx::NativeWindow window) { - views::Widget* widget = views::Widget::GetWidgetFromNativeView(window); + views::Widget* widget = views::Widget::GetWidgetFromNativeWindow(window); if (widget) { void* tabstrip = widget->GetNativeWindowProperty(kTabStripKey); if (tabstrip) @@ -161,8 +161,8 @@ void TabStrip2::DetachDragMoved() { if (detached_drag_mode_) { // We check to see if the mouse cursor is in the magnetism zone of another // visible TabStrip. If so, we should dock to it. - std::set<gfx::NativeWindow> ignore_windows; - ignore_windows.insert(GetWidget()->GetWindow()->GetNativeWindow()); + std::set<gfx::NativeView> ignore_windows; + ignore_windows.insert(GetWidget()->GetNativeView()); gfx::Point screen_point = views::Screen::GetCursorScreenPoint(); gfx::NativeWindow local_window = diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index ee3e197..5bf54d6 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -51,6 +51,7 @@ class WidgetGtk::DropObserver : public MessageLoopForUI::Observer { }; static const char* kWidgetKey = "__VIEWS_WIDGET__"; +static const wchar_t* kWidgetWideKey = L"__VIEWS_WIDGET__"; // Returns the position of a widget on screen. static void GetWidgetPositionOnScreen(GtkWidget* widget, int* x, int *y) { @@ -531,11 +532,6 @@ ThemeProvider* WidgetGtk::GetDefaultThemeProvider() const { return default_theme_provider_.get(); } -FocusManager* WidgetGtk::GetFocusManager() { - NOTIMPLEMENTED(); - return NULL; -} - //////////////////////////////////////////////////////////////////////////////// // WidgetGtk, MessageLoopForUI::Observer implementation: @@ -644,7 +640,7 @@ void WidgetGtk::CreateGtkWidget(GtkWidget* parent, const gfx::Rect& bounds) { gtk_widget_realize(widget_); // Associate this object with the widget. - SetNativeWindowProperty(kWidgetKey, this); + SetNativeWindowProperty(kWidgetWideKey, this); } void WidgetGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) { @@ -1298,3 +1294,4 @@ Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { } } // namespace views + diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h index 57b387c..0323eb3 100644 --- a/views/widget/widget_gtk.h +++ b/views/widget/widget_gtk.h @@ -167,6 +167,10 @@ class WidgetGtk // Gets the WidgetGtk in the userdata section of the widget. static WidgetGtk* GetViewForNative(GtkWidget* widget); + // Gets the WindowGtk in the userdata section of the widget. + // TODO(beng): move to WindowGtk + static WindowGtk* GetWindowForNative(GtkWidget* widget); + // Sets the drop target to NULL. This is invoked by DropTargetGTK when the // drop is done. void ResetDropTarget(); |