| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/native_widget_gtk.h" | 5 #include "views/widget/native_widget_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
| 9 #include <X11/extensions/shape.h> | 9 #include <X11/extensions/shape.h> |
| 10 #include <X11/Xatom.h> | 10 #include <X11/Xatom.h> |
| (...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2137 } | 2137 } |
| 2138 | 2138 |
| 2139 namespace internal { | 2139 namespace internal { |
| 2140 | 2140 |
| 2141 //////////////////////////////////////////////////////////////////////////////// | 2141 //////////////////////////////////////////////////////////////////////////////// |
| 2142 // NativeWidgetPrivate, public: | 2142 // NativeWidgetPrivate, public: |
| 2143 | 2143 |
| 2144 // static | 2144 // static |
| 2145 NativeWidgetPrivate* NativeWidgetPrivate::CreateNativeWidget( | 2145 NativeWidgetPrivate* NativeWidgetPrivate::CreateNativeWidget( |
| 2146 NativeWidgetDelegate* delegate) { | 2146 NativeWidgetDelegate* delegate) { |
| 2147 if (Widget::IsPureViews() && | 2147 if (Widget::IsPureViews() && ViewsDelegate::views_delegate && |
| 2148 ViewsDelegate::views_delegate->GetDefaultParentView()) { | 2148 ViewsDelegate::views_delegate->GetDefaultParentView()) { |
| 2149 return new NativeWidgetViews(delegate); | 2149 return new NativeWidgetViews(delegate); |
| 2150 } | 2150 } |
| 2151 return new NativeWidgetGtk(delegate); | 2151 return new NativeWidgetGtk(delegate); |
| 2152 } | 2152 } |
| 2153 | 2153 |
| 2154 // static | 2154 // static |
| 2155 NativeWidgetPrivate* NativeWidgetPrivate::GetNativeWidgetForNativeView( | 2155 NativeWidgetPrivate* NativeWidgetPrivate::GetNativeWidgetForNativeView( |
| 2156 gfx::NativeView native_view) { | 2156 gfx::NativeView native_view) { |
| 2157 if (!native_view) | 2157 if (!native_view) |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2245 button_pressed = event->type == GDK_BUTTON_PRESS || | 2245 button_pressed = event->type == GDK_BUTTON_PRESS || |
| 2246 event->type == GDK_2BUTTON_PRESS || | 2246 event->type == GDK_2BUTTON_PRESS || |
| 2247 event->type == GDK_3BUTTON_PRESS; | 2247 event->type == GDK_3BUTTON_PRESS; |
| 2248 gdk_event_free(event); | 2248 gdk_event_free(event); |
| 2249 } | 2249 } |
| 2250 return button_pressed; | 2250 return button_pressed; |
| 2251 } | 2251 } |
| 2252 | 2252 |
| 2253 } // namespace internal | 2253 } // namespace internal |
| 2254 } // namespace views | 2254 } // namespace views |
| OLD | NEW |