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 #include <cairo/cairo.h> | 7 #include <cairo/cairo.h> |
8 #include <gdk/gdk.h> | 8 #include <gdk/gdk.h> |
9 #include <gdk/gdkkeysyms.h> | 9 #include <gdk/gdkkeysyms.h> |
10 #include <gdk/gdkx.h> | 10 #include <gdk/gdkx.h> |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "content/browser/accessibility/browser_accessibility_manager_gtk.h" | 27 #include "content/browser/accessibility/browser_accessibility_manager_gtk.h" |
28 #include "content/browser/renderer_host/backing_store_gtk.h" | 28 #include "content/browser/renderer_host/backing_store_gtk.h" |
29 #include "content/browser/renderer_host/gtk_im_context_wrapper.h" | 29 #include "content/browser/renderer_host/gtk_im_context_wrapper.h" |
30 #include "content/browser/renderer_host/gtk_key_bindings_handler.h" | 30 #include "content/browser/renderer_host/gtk_key_bindings_handler.h" |
31 #include "content/browser/renderer_host/gtk_window_utils.h" | 31 #include "content/browser/renderer_host/gtk_window_utils.h" |
32 #include "content/browser/renderer_host/render_view_host_delegate.h" | 32 #include "content/browser/renderer_host/render_view_host_delegate.h" |
33 #include "content/browser/renderer_host/render_view_host_impl.h" | 33 #include "content/browser/renderer_host/render_view_host_impl.h" |
34 #include "content/common/gpu/gpu_messages.h" | 34 #include "content/common/gpu/gpu_messages.h" |
35 #include "content/common/input_messages.h" | 35 #include "content/common/input_messages.h" |
36 #include "content/common/view_messages.h" | 36 #include "content/common/view_messages.h" |
| 37 #include "content/common/webplugin_geometry.h" |
37 #include "content/public/browser/native_web_keyboard_event.h" | 38 #include "content/public/browser/native_web_keyboard_event.h" |
38 #include "content/public/common/content_switches.h" | 39 #include "content/public/common/content_switches.h" |
39 #include "skia/ext/platform_canvas.h" | 40 #include "skia/ext/platform_canvas.h" |
40 #include "third_party/WebKit/public/web/WebInputEvent.h" | 41 #include "third_party/WebKit/public/web/WebInputEvent.h" |
41 #include "third_party/WebKit/public/web/WebScreenInfo.h" | 42 #include "third_party/WebKit/public/web/WebScreenInfo.h" |
42 #include "third_party/WebKit/public/web/gtk/WebInputEventFactory.h" | 43 #include "third_party/WebKit/public/web/gtk/WebInputEventFactory.h" |
43 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 44 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
44 #include "ui/base/gtk/gtk_compat.h" | 45 #include "ui/base/gtk/gtk_compat.h" |
45 #include "ui/base/text/text_elider.h" | 46 #include "ui/base/text/text_elider.h" |
46 #include "ui/base/x/active_window_watcher_x.h" | 47 #include "ui/base/x/active_window_watcher_x.h" |
47 #include "ui/base/x/x11_util.h" | 48 #include "ui/base/x/x11_util.h" |
48 #include "ui/gfx/gtk_native_view_id_manager.h" | 49 #include "ui/gfx/gtk_native_view_id_manager.h" |
49 #include "ui/gfx/gtk_preserve_window.h" | 50 #include "ui/gfx/gtk_preserve_window.h" |
50 #include "webkit/common/cursors/webcursor_gtk_data.h" | 51 #include "webkit/common/cursors/webcursor_gtk_data.h" |
51 #include "webkit/plugins/npapi/webplugin.h" | |
52 | 52 |
53 using WebKit::WebInputEventFactory; | 53 using WebKit::WebInputEventFactory; |
54 using WebKit::WebMouseWheelEvent; | 54 using WebKit::WebMouseWheelEvent; |
55 using WebKit::WebScreenInfo; | 55 using WebKit::WebScreenInfo; |
56 | 56 |
57 namespace content { | 57 namespace content { |
58 namespace { | 58 namespace { |
59 | 59 |
60 // Paint rects on Linux are bounded by the maximum size of a shared memory | 60 // Paint rects on Linux are bounded by the maximum size of a shared memory |
61 // region. By default that's 32MB, but many distros increase it significantly | 61 // region. By default that's 32MB, but many distros increase it significantly |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 return GtkNativeViewManager::GetInstance()->GetIdForWidget(view_.get()); | 746 return GtkNativeViewManager::GetInstance()->GetIdForWidget(view_.get()); |
747 } | 747 } |
748 | 748 |
749 gfx::NativeViewAccessible RenderWidgetHostViewGtk::GetNativeViewAccessible() { | 749 gfx::NativeViewAccessible RenderWidgetHostViewGtk::GetNativeViewAccessible() { |
750 NOTIMPLEMENTED(); | 750 NOTIMPLEMENTED(); |
751 return NULL; | 751 return NULL; |
752 } | 752 } |
753 | 753 |
754 void RenderWidgetHostViewGtk::MovePluginWindows( | 754 void RenderWidgetHostViewGtk::MovePluginWindows( |
755 const gfx::Vector2d& scroll_offset, | 755 const gfx::Vector2d& scroll_offset, |
756 const std::vector<webkit::npapi::WebPluginGeometry>& moves) { | 756 const std::vector<WebPluginGeometry>& moves) { |
757 for (size_t i = 0; i < moves.size(); ++i) { | 757 for (size_t i = 0; i < moves.size(); ++i) { |
758 plugin_container_manager_.MovePluginContainer(moves[i]); | 758 plugin_container_manager_.MovePluginContainer(moves[i]); |
759 } | 759 } |
760 } | 760 } |
761 | 761 |
762 void RenderWidgetHostViewGtk::Focus() { | 762 void RenderWidgetHostViewGtk::Focus() { |
763 gtk_widget_grab_focus(view_.get()); | 763 gtk_widget_grab_focus(view_.get()); |
764 } | 764 } |
765 | 765 |
766 void RenderWidgetHostViewGtk::Blur() { | 766 void RenderWidgetHostViewGtk::Blur() { |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 gfx::PluginWindowHandle id) { | 1575 gfx::PluginWindowHandle id) { |
1576 plugin_container_manager_.CreatePluginContainer(id); | 1576 plugin_container_manager_.CreatePluginContainer(id); |
1577 } | 1577 } |
1578 | 1578 |
1579 void RenderWidgetHostViewGtk::OnDestroyPluginContainer( | 1579 void RenderWidgetHostViewGtk::OnDestroyPluginContainer( |
1580 gfx::PluginWindowHandle id) { | 1580 gfx::PluginWindowHandle id) { |
1581 plugin_container_manager_.DestroyPluginContainer(id); | 1581 plugin_container_manager_.DestroyPluginContainer(id); |
1582 } | 1582 } |
1583 | 1583 |
1584 } // namespace content | 1584 } // namespace content |
OLD | NEW |