OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host_view_views.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_views.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
14 #include "base/string_number_conversions.h" | 14 #include "base/string_number_conversions.h" |
15 #include "base/task.h" | 15 #include "base/task.h" |
16 #include "base/time.h" | 16 #include "base/time.h" |
17 #include "chrome/browser/renderer_host/backing_store_x.h" | 17 #include "chrome/browser/renderer_host/backing_store_x.h" |
18 #include "chrome/browser/renderer_host/render_widget_host.h" | 18 #include "chrome/browser/renderer_host/render_widget_host.h" |
19 #include "chrome/common/native_web_keyboard_event.h" | 19 #include "chrome/common/native_web_keyboard_event.h" |
20 #include "chrome/common/render_messages.h" | 20 #include "chrome/common/render_messages.h" |
21 #include "chrome/common/result_codes.h" | 21 #include "chrome/common/result_codes.h" |
22 #include "gfx/canvas.h" | |
23 #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFact
ory.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFact
ory.h" |
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
25 #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" | 24 #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" |
26 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
27 #include "ui/base/x/x11_util.h" | 26 #include "ui/base/x/x11_util.h" |
| 27 #include "ui/gfx/canvas.h" |
28 #include "views/event.h" | 28 #include "views/event.h" |
29 #include "views/widget/widget.h" | 29 #include "views/widget/widget.h" |
30 #include "views/widget/widget_gtk.h" | 30 #include "views/widget/widget_gtk.h" |
31 | 31 |
32 static const int kMaxWindowWidth = 4000; | 32 static const int kMaxWindowWidth = 4000; |
33 static const int kMaxWindowHeight = 4000; | 33 static const int kMaxWindowHeight = 4000; |
34 static const char* kRenderWidgetHostViewKey = "__RENDER_WIDGET_HOST_VIEW__"; | 34 static const char* kRenderWidgetHostViewKey = "__RENDER_WIDGET_HOST_VIEW__"; |
35 | 35 |
36 using WebKit::WebInputEventFactory; | 36 using WebKit::WebInputEventFactory; |
37 using WebKit::WebMouseWheelEvent; | 37 using WebKit::WebMouseWheelEvent; |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 } | 768 } |
769 | 769 |
770 // static | 770 // static |
771 RenderWidgetHostView* | 771 RenderWidgetHostView* |
772 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 772 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
773 gfx::NativeView widget) { | 773 gfx::NativeView widget) { |
774 gpointer user_data = g_object_get_data(G_OBJECT(widget), | 774 gpointer user_data = g_object_get_data(G_OBJECT(widget), |
775 kRenderWidgetHostViewKey); | 775 kRenderWidgetHostViewKey); |
776 return reinterpret_cast<RenderWidgetHostView*>(user_data); | 776 return reinterpret_cast<RenderWidgetHostView*>(user_data); |
777 } | 777 } |
OLD | NEW |