| 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_BASE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| 7 | 7 |
| 8 #if defined(OS_MACOSX) | 8 #if defined(OS_MACOSX) |
| 9 #include <OpenGL/OpenGL.h> | 9 #include <OpenGL/OpenGL.h> |
| 10 #endif | 10 #endif |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 namespace media { | 44 namespace media { |
| 45 class VideoFrame; | 45 class VideoFrame; |
| 46 } | 46 } |
| 47 | 47 |
| 48 namespace blink { | 48 namespace blink { |
| 49 struct WebScreenInfo; | 49 struct WebScreenInfo; |
| 50 } | 50 } |
| 51 | 51 |
| 52 namespace content { | 52 namespace content { |
| 53 class BrowserAccessibilityDelegate; |
| 53 class BrowserAccessibilityManager; | 54 class BrowserAccessibilityManager; |
| 54 class SyntheticGesture; | 55 class SyntheticGesture; |
| 55 class SyntheticGestureTarget; | 56 class SyntheticGestureTarget; |
| 56 class WebCursor; | 57 class WebCursor; |
| 57 struct DidOverscrollParams; | 58 struct DidOverscrollParams; |
| 58 struct NativeWebKeyboardEvent; | 59 struct NativeWebKeyboardEvent; |
| 59 struct WebPluginGeometry; | 60 struct WebPluginGeometry; |
| 60 | 61 |
| 61 // Basic implementation shared by concrete RenderWidgetHostView subclasses. | 62 // Basic implementation shared by concrete RenderWidgetHostView subclasses. |
| 62 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, | 63 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 81 // IPC::Listener implementation: | 82 // IPC::Listener implementation: |
| 82 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 83 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 83 | 84 |
| 84 // Called by the host when the input flush has completed. | 85 // Called by the host when the input flush has completed. |
| 85 void OnDidFlushInput(); | 86 void OnDidFlushInput(); |
| 86 | 87 |
| 87 void SetPopupType(blink::WebPopupType popup_type); | 88 void SetPopupType(blink::WebPopupType popup_type); |
| 88 | 89 |
| 89 blink::WebPopupType GetPopupType(); | 90 blink::WebPopupType GetPopupType(); |
| 90 | 91 |
| 91 // Get the BrowserAccessibilityManager if it exists, may return NULL. | |
| 92 BrowserAccessibilityManager* GetBrowserAccessibilityManager() const; | |
| 93 | |
| 94 void SetBrowserAccessibilityManager(BrowserAccessibilityManager* manager); | |
| 95 | |
| 96 // Return a value that is incremented each time the renderer swaps a new frame | 92 // Return a value that is incremented each time the renderer swaps a new frame |
| 97 // to the view. | 93 // to the view. |
| 98 uint32 RendererFrameNumber(); | 94 uint32 RendererFrameNumber(); |
| 99 | 95 |
| 100 // Called each time the RenderWidgetHost receives a new frame for display from | 96 // Called each time the RenderWidgetHost receives a new frame for display from |
| 101 // the renderer. | 97 // the renderer. |
| 102 void DidReceiveRendererFrame(); | 98 void DidReceiveRendererFrame(); |
| 103 | 99 |
| 104 // Notification that a resize or move session ended on the native widget. | 100 // Notification that a resize or move session ended on the native widget. |
| 105 void UpdateScreenInfo(gfx::NativeView view); | 101 void UpdateScreenInfo(gfx::NativeView view); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 virtual void GestureEventAck(const blink::WebGestureEvent& event, | 140 virtual void GestureEventAck(const blink::WebGestureEvent& event, |
| 145 InputEventAckState ack_result); | 141 InputEventAckState ack_result); |
| 146 | 142 |
| 147 // Create a platform specific SyntheticGestureTarget implementation that will | 143 // Create a platform specific SyntheticGestureTarget implementation that will |
| 148 // be used to inject synthetic input events. | 144 // be used to inject synthetic input events. |
| 149 virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget(); | 145 virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget(); |
| 150 | 146 |
| 151 // Return true if frame subscription is supported on this platform. | 147 // Return true if frame subscription is supported on this platform. |
| 152 virtual bool CanSubscribeFrame() const; | 148 virtual bool CanSubscribeFrame() const; |
| 153 | 149 |
| 154 // Create a BrowserAccessibilityManager for this view if it's possible to | 150 // Create a BrowserAccessibilityManager for this view. |
| 155 // create one and if one doesn't exist already. Some ports may not create | 151 virtual BrowserAccessibilityManager* CreateBrowserAccessibilityManager( |
| 156 // one depending on the current state. | 152 BrowserAccessibilityDelegate* delegate); |
| 157 virtual void CreateBrowserAccessibilityManagerIfNeeded(); | |
| 158 | 153 |
| 159 virtual void OnAccessibilitySetFocus(int acc_obj_id); | 154 virtual void AccessibilityShowMenu(const gfx::Point& point); |
| 160 virtual void AccessibilityShowMenu(int acc_obj_id); | |
| 161 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds); | 155 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds); |
| 162 | 156 |
| 163 virtual SkColorType PreferredReadbackFormat(); | 157 virtual SkColorType PreferredReadbackFormat(); |
| 164 | 158 |
| 165 // Informs that the focused DOM node has changed. | 159 // Informs that the focused DOM node has changed. |
| 166 virtual void FocusedNodeChanged(bool is_editable_node) {} | 160 virtual void FocusedNodeChanged(bool is_editable_node) {} |
| 167 | 161 |
| 168 virtual void OnSwapCompositorFrame(uint32 output_surface_id, | 162 virtual void OnSwapCompositorFrame(uint32 output_surface_id, |
| 169 scoped_ptr<cc::CompositorFrame> frame) {} | 163 scoped_ptr<cc::CompositorFrame> frame) {} |
| 170 | 164 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 // The orientation of the display the renderer is currently on. | 413 // The orientation of the display the renderer is currently on. |
| 420 gfx::Display::Rotation current_display_rotation_; | 414 gfx::Display::Rotation current_display_rotation_; |
| 421 | 415 |
| 422 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the | 416 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the |
| 423 // renderer. | 417 // renderer. |
| 424 bool pinch_zoom_enabled_; | 418 bool pinch_zoom_enabled_; |
| 425 | 419 |
| 426 private: | 420 private: |
| 427 void FlushInput(); | 421 void FlushInput(); |
| 428 | 422 |
| 429 // Manager of the tree representation of the WebKit render tree. | |
| 430 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | |
| 431 | |
| 432 gfx::Rect current_display_area_; | 423 gfx::Rect current_display_area_; |
| 433 | 424 |
| 434 uint32 renderer_frame_number_; | 425 uint32 renderer_frame_number_; |
| 435 | 426 |
| 436 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; | 427 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; |
| 437 | 428 |
| 438 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 429 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 439 }; | 430 }; |
| 440 | 431 |
| 441 } // namespace content | 432 } // namespace content |
| 442 | 433 |
| 443 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 434 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |