| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
| 7 | 7 |
| 8 #include <gdk/gdk.h> | 8 #include <gdk/gdk.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "content/browser/accessibility/browser_accessibility_manager.h" | 15 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 16 #include "content/browser/renderer_host/gtk_plugin_container_manager.h" |
| 16 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 17 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 17 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 18 #include "ipc/ipc_sender.h" | 19 #include "ipc/ipc_sender.h" |
| 19 #include "ui/base/animation/animation_delegate.h" | 20 #include "ui/base/animation/animation_delegate.h" |
| 20 #include "ui/base/animation/slide_animation.h" | 21 #include "ui/base/animation/slide_animation.h" |
| 21 #include "ui/base/gtk/gtk_signal.h" | 22 #include "ui/base/gtk/gtk_signal.h" |
| 22 #include "ui/base/gtk/gtk_signal_registrar.h" | 23 #include "ui/base/gtk/gtk_signal_registrar.h" |
| 23 #include "ui/base/gtk/owned_widget_gtk.h" | 24 #include "ui/base/gtk/owned_widget_gtk.h" |
| 24 #include "ui/base/x/active_window_watcher_x_observer.h" | 25 #include "ui/base/x/active_window_watcher_x_observer.h" |
| 25 #include "ui/gfx/native_widget_types.h" | 26 #include "ui/gfx/native_widget_types.h" |
| 26 #include "ui/gfx/point.h" | 27 #include "ui/gfx/point.h" |
| 27 #include "ui/gfx/rect.h" | 28 #include "ui/gfx/rect.h" |
| 28 #include "webkit/common/cursors/webcursor.h" | 29 #include "webkit/common/cursors/webcursor.h" |
| 29 #include "webkit/plugins/npapi/gtk_plugin_container_manager.h" | |
| 30 | 30 |
| 31 typedef struct _GtkClipboard GtkClipboard; | 31 typedef struct _GtkClipboard GtkClipboard; |
| 32 typedef struct _GtkSelectionData GtkSelectionData; | 32 typedef struct _GtkSelectionData GtkSelectionData; |
| 33 | 33 |
| 34 namespace content { | 34 namespace content { |
| 35 class GtkIMContextWrapper; | 35 class GtkIMContextWrapper; |
| 36 class GtkKeyBindingsHandler; | 36 class GtkKeyBindingsHandler; |
| 37 class RenderWidgetHost; | 37 class RenderWidgetHost; |
| 38 class RenderWidgetHostImpl; | 38 class RenderWidgetHostImpl; |
| 39 struct NativeWebKeyboardEvent; | 39 struct NativeWebKeyboardEvent; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 70 | 70 |
| 71 // RenderWidgetHostViewPort implementation. | 71 // RenderWidgetHostViewPort implementation. |
| 72 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, | 72 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, |
| 73 const gfx::Rect& pos) OVERRIDE; | 73 const gfx::Rect& pos) OVERRIDE; |
| 74 virtual void InitAsFullscreen( | 74 virtual void InitAsFullscreen( |
| 75 RenderWidgetHostView* reference_host_view) OVERRIDE; | 75 RenderWidgetHostView* reference_host_view) OVERRIDE; |
| 76 virtual void WasShown() OVERRIDE; | 76 virtual void WasShown() OVERRIDE; |
| 77 virtual void WasHidden() OVERRIDE; | 77 virtual void WasHidden() OVERRIDE; |
| 78 virtual void MovePluginWindows( | 78 virtual void MovePluginWindows( |
| 79 const gfx::Vector2d& scroll_offset, | 79 const gfx::Vector2d& scroll_offset, |
| 80 const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; | 80 const std::vector<WebPluginGeometry>& moves) OVERRIDE; |
| 81 virtual void Focus() OVERRIDE; | 81 virtual void Focus() OVERRIDE; |
| 82 virtual void Blur() OVERRIDE; | 82 virtual void Blur() OVERRIDE; |
| 83 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; | 83 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; |
| 84 virtual void SetIsLoading(bool is_loading) OVERRIDE; | 84 virtual void SetIsLoading(bool is_loading) OVERRIDE; |
| 85 virtual void TextInputTypeChanged(ui::TextInputType type, | 85 virtual void TextInputTypeChanged(ui::TextInputType type, |
| 86 bool can_compose_inline, | 86 bool can_compose_inline, |
| 87 ui::TextInputMode input_mode) OVERRIDE; | 87 ui::TextInputMode input_mode) OVERRIDE; |
| 88 virtual void ImeCancelComposition() OVERRIDE; | 88 virtual void ImeCancelComposition() OVERRIDE; |
| 89 virtual void DidUpdateBackingStore( | 89 virtual void DidUpdateBackingStore( |
| 90 const gfx::Rect& scroll_rect, | 90 const gfx::Rect& scroll_rect, |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 unsigned long destroy_handler_id_; | 294 unsigned long destroy_handler_id_; |
| 295 | 295 |
| 296 // A convenience wrapper object for GtkIMContext; | 296 // A convenience wrapper object for GtkIMContext; |
| 297 scoped_ptr<GtkIMContextWrapper> im_context_; | 297 scoped_ptr<GtkIMContextWrapper> im_context_; |
| 298 | 298 |
| 299 // A convenience object for handling editor key bindings defined in gtk | 299 // A convenience object for handling editor key bindings defined in gtk |
| 300 // keyboard theme. | 300 // keyboard theme. |
| 301 scoped_ptr<GtkKeyBindingsHandler> key_bindings_handler_; | 301 scoped_ptr<GtkKeyBindingsHandler> key_bindings_handler_; |
| 302 | 302 |
| 303 // Helper class that lets us allocate plugin containers and move them. | 303 // Helper class that lets us allocate plugin containers and move them. |
| 304 webkit::npapi::GtkPluginContainerManager plugin_container_manager_; | 304 GtkPluginContainerManager plugin_container_manager_; |
| 305 | 305 |
| 306 // The size that we want the renderer to be. We keep this in a separate | 306 // The size that we want the renderer to be. We keep this in a separate |
| 307 // variable because resizing in GTK+ is async. | 307 // variable because resizing in GTK+ is async. |
| 308 gfx::Size requested_size_; | 308 gfx::Size requested_size_; |
| 309 | 309 |
| 310 // The latest reported center of the widget, use GetWidgetCenter() to access. | 310 // The latest reported center of the widget, use GetWidgetCenter() to access. |
| 311 gfx::Point widget_center_; | 311 gfx::Point widget_center_; |
| 312 // If the window moves the widget_center will not be valid until we recompute. | 312 // If the window moves the widget_center will not be valid until we recompute. |
| 313 bool widget_center_valid_; | 313 bool widget_center_valid_; |
| 314 | 314 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 333 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | 333 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; |
| 334 | 334 |
| 335 ui::GtkSignalRegistrar signals_; | 335 ui::GtkSignalRegistrar signals_; |
| 336 | 336 |
| 337 ui::LatencyInfo software_latency_info_; | 337 ui::LatencyInfo software_latency_info_; |
| 338 }; | 338 }; |
| 339 | 339 |
| 340 } // namespace content | 340 } // namespace content |
| 341 | 341 |
| 342 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 342 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
| OLD | NEW |