| 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_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 5 #ifndef CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
| 6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/public/browser/render_widget_host_view.h" | 12 #include "content/public/browser/render_widget_host_view.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
| 14 #include "ui/base/ime/text_input_type.h" | 14 #include "ui/base/ime/text_input_type.h" |
| 15 #include "ui/base/range/range.h" | 15 #include "ui/base/range/range.h" |
| 16 #include "ui/surface/transport_dib.h" | 16 #include "ui/surface/transport_dib.h" |
| 17 | 17 |
| 18 class BackingStore; | |
| 19 class WebCursor; | 18 class WebCursor; |
| 20 | 19 |
| 21 struct AccessibilityHostMsg_NotificationParams; | 20 struct AccessibilityHostMsg_NotificationParams; |
| 22 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | 21 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
| 23 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; | 22 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; |
| 24 | 23 |
| 25 namespace content { | |
| 26 struct NativeWebKeyboardEvent; | |
| 27 } | |
| 28 | |
| 29 namespace webkit { | 24 namespace webkit { |
| 30 namespace npapi { | 25 namespace npapi { |
| 31 struct WebPluginGeometry; | 26 struct WebPluginGeometry; |
| 32 } | 27 } |
| 33 } | 28 } |
| 34 | 29 |
| 35 #if defined(OS_POSIX) || defined(USE_AURA) | 30 #if defined(OS_POSIX) || defined(USE_AURA) |
| 36 namespace WebKit { | 31 namespace WebKit { |
| 37 struct WebScreenInfo; | 32 struct WebScreenInfo; |
| 38 } | 33 } |
| 39 #endif | 34 #endif |
| 40 | 35 |
| 41 namespace content { | 36 namespace content { |
| 42 | 37 class BackingStore; |
| 43 class SmoothScrollGesture; | 38 class SmoothScrollGesture; |
| 39 struct NativeWebKeyboardEvent; |
| 44 | 40 |
| 45 // This is the larger RenderWidgetHostView interface exposed only | 41 // This is the larger RenderWidgetHostView interface exposed only |
| 46 // within content/ and to embedders looking to port to new platforms. | 42 // within content/ and to embedders looking to port to new platforms. |
| 47 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. | 43 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. |
| 48 class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView { | 44 class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView { |
| 49 public: | 45 public: |
| 50 virtual ~RenderWidgetHostViewPort() {} | 46 virtual ~RenderWidgetHostViewPort() {} |
| 51 | 47 |
| 52 // Does the cast for you. | 48 // Does the cast for you. |
| 53 static RenderWidgetHostViewPort* FromRWHV(RenderWidgetHostView* rwhv); | 49 static RenderWidgetHostViewPort* FromRWHV(RenderWidgetHostView* rwhv); |
| 54 | 50 |
| 55 // Like RenderWidgetHostView::CreateViewForWidget, with cast. | 51 // Like RenderWidgetHostView::CreateViewForWidget, with cast. |
| 56 static RenderWidgetHostViewPort* CreateViewForWidget( | 52 static RenderWidgetHostViewPort* CreateViewForWidget( |
| 57 content::RenderWidgetHost* widget); | 53 RenderWidgetHost* widget); |
| 58 | 54 |
| 59 // Perform all the initialization steps necessary for this object to represent | 55 // Perform all the initialization steps necessary for this object to represent |
| 60 // a popup (such as a <select> dropdown), then shows the popup at |pos|. | 56 // a popup (such as a <select> dropdown), then shows the popup at |pos|. |
| 61 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, | 57 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, |
| 62 const gfx::Rect& pos) = 0; | 58 const gfx::Rect& pos) = 0; |
| 63 | 59 |
| 64 // Perform all the initialization steps necessary for this object to represent | 60 // Perform all the initialization steps necessary for this object to represent |
| 65 // a full screen window. | 61 // a full screen window. |
| 66 // |reference_host_view| is the view associated with the creating page that | 62 // |reference_host_view| is the view associated with the creating page that |
| 67 // helps to position the full screen widget on the correct monitor. | 63 // helps to position the full screen widget on the correct monitor. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 virtual void PluginFocusChanged(bool focused, int plugin_id) = 0; | 186 virtual void PluginFocusChanged(bool focused, int plugin_id) = 0; |
| 191 | 187 |
| 192 // Start plugin IME. | 188 // Start plugin IME. |
| 193 virtual void StartPluginIme() = 0; | 189 virtual void StartPluginIme() = 0; |
| 194 | 190 |
| 195 // Does any event handling necessary for plugin IME; should be called after | 191 // Does any event handling necessary for plugin IME; should be called after |
| 196 // the plugin has already had a chance to process the event. If plugin IME is | 192 // the plugin has already had a chance to process the event. If plugin IME is |
| 197 // not enabled, this is a no-op, so it is always safe to call. | 193 // not enabled, this is a no-op, so it is always safe to call. |
| 198 // Returns true if the event was handled by IME. | 194 // Returns true if the event was handled by IME. |
| 199 virtual bool PostProcessEventForPluginIme( | 195 virtual bool PostProcessEventForPluginIme( |
| 200 const content::NativeWebKeyboardEvent& event) = 0; | 196 const NativeWebKeyboardEvent& event) = 0; |
| 201 | 197 |
| 202 // Methods associated with GPU-accelerated plug-in instances. | 198 // Methods associated with GPU-accelerated plug-in instances. |
| 203 virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle( | 199 virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle( |
| 204 bool opaque, bool root) = 0; | 200 bool opaque, bool root) = 0; |
| 205 virtual void DestroyFakePluginWindowHandle( | 201 virtual void DestroyFakePluginWindowHandle( |
| 206 gfx::PluginWindowHandle window) = 0; | 202 gfx::PluginWindowHandle window) = 0; |
| 207 virtual void AcceleratedSurfaceSetIOSurface( | 203 virtual void AcceleratedSurfaceSetIOSurface( |
| 208 gfx::PluginWindowHandle window, | 204 gfx::PluginWindowHandle window, |
| 209 int32 width, | 205 int32 width, |
| 210 int32 height, | 206 int32 height, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 virtual BrowserAccessibilityManager* | 263 virtual BrowserAccessibilityManager* |
| 268 GetBrowserAccessibilityManager() const = 0; | 264 GetBrowserAccessibilityManager() const = 0; |
| 269 virtual void OnAccessibilityNotifications( | 265 virtual void OnAccessibilityNotifications( |
| 270 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { | 266 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { |
| 271 } | 267 } |
| 272 }; | 268 }; |
| 273 | 269 |
| 274 } // namespace content | 270 } // namespace content |
| 275 | 271 |
| 276 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 272 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
| OLD | NEW |