| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_gtk.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" |
| 6 | 6 |
| 7 // If this gets included after the gtk headers, then a bunch of compiler | 7 // If this gets included after the gtk headers, then a bunch of compiler |
| 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts | 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts |
| 9 // badly with net::URLRequestStatus::Status. | 9 // badly with net::URLRequestStatus::Status. |
| 10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 | 98 |
| 99 bool MovedToCenter(const WebKit::WebMouseEvent& mouse_event, | 99 bool MovedToCenter(const WebKit::WebMouseEvent& mouse_event, |
| 100 const gfx::Point& center) { | 100 const gfx::Point& center) { |
| 101 return mouse_event.globalX == center.x() && | 101 return mouse_event.globalX == center.x() && |
| 102 mouse_event.globalY == center.y(); | 102 mouse_event.globalY == center.y(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace | 105 } // namespace |
| 106 | 106 |
| 107 using content::RenderWidgetHostView; |
| 107 using content::RenderWidgetHostViewPort; | 108 using content::RenderWidgetHostViewPort; |
| 108 using WebKit::WebInputEventFactory; | 109 using WebKit::WebInputEventFactory; |
| 109 using WebKit::WebMouseWheelEvent; | 110 using WebKit::WebMouseWheelEvent; |
| 110 | 111 |
| 111 // This class is a simple convenience wrapper for Gtk functions. It has only | 112 // This class is a simple convenience wrapper for Gtk functions. It has only |
| 112 // static methods. | 113 // static methods. |
| 113 class RenderWidgetHostViewGtkWidget { | 114 class RenderWidgetHostViewGtkWidget { |
| 114 public: | 115 public: |
| 115 static GtkWidget* CreateNewWidget(RenderWidgetHostViewGtk* host_view) { | 116 static GtkWidget* CreateNewWidget(RenderWidgetHostViewGtk* host_view) { |
| 116 GtkWidget* widget = gtk_preserve_window_new(); | 117 GtkWidget* widget = gtk_preserve_window_new(); |
| (...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 return new RenderWidgetHostViewGtk(widget); | 1410 return new RenderWidgetHostViewGtk(widget); |
| 1410 } | 1411 } |
| 1411 | 1412 |
| 1412 // static | 1413 // static |
| 1413 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( | 1414 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( |
| 1414 WebKit::WebScreenInfo* results) { | 1415 WebKit::WebScreenInfo* results) { |
| 1415 GdkWindow* gdk_window = | 1416 GdkWindow* gdk_window = |
| 1416 gdk_display_get_default_group(gdk_display_get_default()); | 1417 gdk_display_get_default_group(gdk_display_get_default()); |
| 1417 content::GetScreenInfoFromNativeWindow(gdk_window, results); | 1418 content::GetScreenInfoFromNativeWindow(gdk_window, results); |
| 1418 } | 1419 } |
| OLD | NEW |