| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 namespace media { | 43 namespace media { |
| 44 class VideoFrame; | 44 class VideoFrame; |
| 45 } | 45 } |
| 46 | 46 |
| 47 namespace blink { | 47 namespace blink { |
| 48 struct WebScreenInfo; | 48 struct WebScreenInfo; |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace content { | 51 namespace content { |
| 52 class BrowserAccessibilityDelegate; |
| 52 class BrowserAccessibilityManager; | 53 class BrowserAccessibilityManager; |
| 53 class SyntheticGesture; | 54 class SyntheticGesture; |
| 54 class SyntheticGestureTarget; | 55 class SyntheticGestureTarget; |
| 55 class WebCursor; | 56 class WebCursor; |
| 56 struct DidOverscrollParams; | 57 struct DidOverscrollParams; |
| 57 struct NativeWebKeyboardEvent; | 58 struct NativeWebKeyboardEvent; |
| 58 struct WebPluginGeometry; | 59 struct WebPluginGeometry; |
| 59 | 60 |
| 60 // Basic implementation shared by concrete RenderWidgetHostView subclasses. | 61 // Basic implementation shared by concrete RenderWidgetHostView subclasses. |
| 61 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, | 62 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 84 // virtual for testing. | 85 // virtual for testing. |
| 85 virtual void UnhandledWheelEvent(const blink::WebMouseWheelEvent& event); | 86 virtual void UnhandledWheelEvent(const blink::WebMouseWheelEvent& event); |
| 86 | 87 |
| 87 // Called by the host when the input flush has completed. | 88 // Called by the host when the input flush has completed. |
| 88 void OnDidFlushInput(); | 89 void OnDidFlushInput(); |
| 89 | 90 |
| 90 void SetPopupType(blink::WebPopupType popup_type); | 91 void SetPopupType(blink::WebPopupType popup_type); |
| 91 | 92 |
| 92 blink::WebPopupType GetPopupType(); | 93 blink::WebPopupType GetPopupType(); |
| 93 | 94 |
| 94 // Get the BrowserAccessibilityManager if it exists, may return NULL. | |
| 95 BrowserAccessibilityManager* GetBrowserAccessibilityManager() const; | |
| 96 | |
| 97 void SetBrowserAccessibilityManager(BrowserAccessibilityManager* manager); | |
| 98 | |
| 99 // Return a value that is incremented each time the renderer swaps a new frame | 95 // Return a value that is incremented each time the renderer swaps a new frame |
| 100 // to the view. | 96 // to the view. |
| 101 uint32 RendererFrameNumber(); | 97 uint32 RendererFrameNumber(); |
| 102 | 98 |
| 103 // Called each time the RenderWidgetHost receives a new frame for display from | 99 // Called each time the RenderWidgetHost receives a new frame for display from |
| 104 // the renderer. | 100 // the renderer. |
| 105 void DidReceiveRendererFrame(); | 101 void DidReceiveRendererFrame(); |
| 106 | 102 |
| 107 // Notification that a resize or move session ended on the native widget. | 103 // Notification that a resize or move session ended on the native widget. |
| 108 void UpdateScreenInfo(gfx::NativeView view); | 104 void UpdateScreenInfo(gfx::NativeView view); |
| (...skipping 35 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 SkBitmap::Config PreferredReadbackFormat(); | 157 virtual SkBitmap::Config 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 // The orientation of the display the renderer is currently on. | 408 // The orientation of the display the renderer is currently on. |
| 415 gfx::Display::Rotation current_display_rotation_; | 409 gfx::Display::Rotation current_display_rotation_; |
| 416 | 410 |
| 417 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the | 411 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the |
| 418 // renderer. | 412 // renderer. |
| 419 bool pinch_zoom_enabled_; | 413 bool pinch_zoom_enabled_; |
| 420 | 414 |
| 421 private: | 415 private: |
| 422 void FlushInput(); | 416 void FlushInput(); |
| 423 | 417 |
| 424 // Manager of the tree representation of the WebKit render tree. | |
| 425 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | |
| 426 | |
| 427 gfx::Rect current_display_area_; | 418 gfx::Rect current_display_area_; |
| 428 | 419 |
| 429 uint32 renderer_frame_number_; | 420 uint32 renderer_frame_number_; |
| 430 | 421 |
| 431 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; | 422 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; |
| 432 | 423 |
| 433 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 424 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 434 }; | 425 }; |
| 435 | 426 |
| 436 } // namespace content | 427 } // namespace content |
| 437 | 428 |
| 438 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 429 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |