| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "views/widget/widget_gtk.h" | 5 #include "views/widget/widget_gtk.h" | 
| 6 | 6 | 
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" | 
| 8 #include "views/fill_layout.h" | 8 #include "views/fill_layout.h" | 
| 9 #include "views/widget/default_theme_provider.h" | 9 #include "views/widget/default_theme_provider.h" | 
| 10 #include "views/widget/root_view.h" | 10 #include "views/widget/root_view.h" | 
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 70 WidgetGtk::~WidgetGtk() { | 70 WidgetGtk::~WidgetGtk() { | 
| 71   MessageLoopForUI::current()->RemoveObserver(this); | 71   MessageLoopForUI::current()->RemoveObserver(this); | 
| 72 } | 72 } | 
| 73 | 73 | 
| 74 void WidgetGtk::Init(GtkWidget* parent, | 74 void WidgetGtk::Init(GtkWidget* parent, | 
| 75                      const gfx::Rect& bounds, | 75                      const gfx::Rect& bounds, | 
| 76                      bool has_own_focus_manager) { | 76                      bool has_own_focus_manager) { | 
| 77   // Force creation of the RootView if it hasn't been created yet. | 77   // Force creation of the RootView if it hasn't been created yet. | 
| 78   GetRootView(); | 78   GetRootView(); | 
| 79 | 79 | 
|  | 80 #if !defined(LINUX2) | 
| 80   default_theme_provider_.reset(new DefaultThemeProvider()); | 81   default_theme_provider_.reset(new DefaultThemeProvider()); | 
|  | 82 #endif | 
| 81 | 83 | 
| 82   // Make container here. | 84   // Make container here. | 
| 83   CreateGtkWidget(); | 85   CreateGtkWidget(); | 
| 84 | 86 | 
| 85   // Make sure we receive our motion events. | 87   // Make sure we receive our motion events. | 
| 86 | 88 | 
| 87   // In general we register most events on the parent of all widgets. At a | 89   // In general we register most events on the parent of all widgets. At a | 
| 88   // minimum we need painting to happen on the parent (otherwise painting | 90   // minimum we need painting to happen on the parent (otherwise painting | 
| 89   // doesn't work at all), and similarly we need mouse release events on the | 91   // doesn't work at all), and similarly we need mouse release events on the | 
| 90   // parent as windows don't get mouse releases. | 92   // parent as windows don't get mouse releases. | 
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 690 void WidgetGtk::HandleGrabBroke() { | 692 void WidgetGtk::HandleGrabBroke() { | 
| 691   if (has_capture_) { | 693   if (has_capture_) { | 
| 692     if (is_mouse_down_) | 694     if (is_mouse_down_) | 
| 693       root_view_->ProcessMouseDragCanceled(); | 695       root_view_->ProcessMouseDragCanceled(); | 
| 694     is_mouse_down_ = false; | 696     is_mouse_down_ = false; | 
| 695     has_capture_ = false; | 697     has_capture_ = false; | 
| 696   } | 698   } | 
| 697 } | 699 } | 
| 698 | 700 | 
| 699 }  // namespace views | 701 }  // namespace views | 
| OLD | NEW | 
|---|