| 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 "app/gfx/path.h" | 7 #include "app/gfx/path.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "views/fill_layout.h" | 9 #include "views/fill_layout.h" |
| 10 #include "views/widget/default_theme_provider.h" | 10 #include "views/widget/default_theme_provider.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 WidgetGtk::~WidgetGtk() { | 75 WidgetGtk::~WidgetGtk() { |
| 76 MessageLoopForUI::current()->RemoveObserver(this); | 76 MessageLoopForUI::current()->RemoveObserver(this); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void WidgetGtk::Init(GtkWidget* parent, | 79 void WidgetGtk::Init(GtkWidget* parent, |
| 80 const gfx::Rect& bounds) { | 80 const gfx::Rect& bounds) { |
| 81 // Force creation of the RootView if it hasn't been created yet. | 81 // Force creation of the RootView if it hasn't been created yet. |
| 82 GetRootView(); | 82 GetRootView(); |
| 83 | 83 |
| 84 #if !defined(LINUX2) | 84 #if !defined(OS_CHROMEOS) |
| 85 default_theme_provider_.reset(new DefaultThemeProvider()); | 85 default_theme_provider_.reset(new DefaultThemeProvider()); |
| 86 #endif | 86 #endif |
| 87 | 87 |
| 88 // Make container here. | 88 // Make container here. |
| 89 CreateGtkWidget(parent, bounds); | 89 CreateGtkWidget(parent, bounds); |
| 90 | 90 |
| 91 // Make sure we receive our motion events. | 91 // Make sure we receive our motion events. |
| 92 | 92 |
| 93 // In general we register most events on the parent of all widgets. At a | 93 // In general we register most events on the parent of all widgets. At a |
| 94 // minimum we need painting to happen on the parent (otherwise painting | 94 // minimum we need painting to happen on the parent (otherwise painting |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 void WidgetGtk::HandleGrabBroke() { | 824 void WidgetGtk::HandleGrabBroke() { |
| 825 if (has_capture_) { | 825 if (has_capture_) { |
| 826 if (is_mouse_down_) | 826 if (is_mouse_down_) |
| 827 root_view_->ProcessMouseDragCanceled(); | 827 root_view_->ProcessMouseDragCanceled(); |
| 828 is_mouse_down_ = false; | 828 is_mouse_down_ = false; |
| 829 has_capture_ = false; | 829 has_capture_ = false; |
| 830 } | 830 } |
| 831 } | 831 } |
| 832 | 832 |
| 833 } // namespace views | 833 } // namespace views |
| OLD | NEW |