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 WebPluginGeometry; | 57 struct WebPluginGeometry; |
57 struct NativeWebKeyboardEvent; | 58 struct NativeWebKeyboardEvent; |
58 | 59 |
59 // Basic implementation shared by concrete RenderWidgetHostView subclasses. | 60 // Basic implementation shared by concrete RenderWidgetHostView subclasses. |
60 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, | 61 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
61 public IPC::Listener { | 62 public IPC::Listener { |
(...skipping 21 matching lines...) Expand all Loading... |
83 // virtual for testing. | 84 // virtual for testing. |
84 virtual void UnhandledWheelEvent(const blink::WebMouseWheelEvent& event); | 85 virtual void UnhandledWheelEvent(const blink::WebMouseWheelEvent& event); |
85 | 86 |
86 // Called by the host when the input flush has completed. | 87 // Called by the host when the input flush has completed. |
87 void OnDidFlushInput(); | 88 void OnDidFlushInput(); |
88 | 89 |
89 void SetPopupType(blink::WebPopupType popup_type); | 90 void SetPopupType(blink::WebPopupType popup_type); |
90 | 91 |
91 blink::WebPopupType GetPopupType(); | 92 blink::WebPopupType GetPopupType(); |
92 | 93 |
93 // Get the BrowserAccessibilityManager if it exists, may return NULL. | |
94 BrowserAccessibilityManager* GetBrowserAccessibilityManager() const; | |
95 | |
96 void SetBrowserAccessibilityManager(BrowserAccessibilityManager* manager); | |
97 | |
98 // Return a value that is incremented each time the renderer swaps a new frame | 94 // Return a value that is incremented each time the renderer swaps a new frame |
99 // to the view. | 95 // to the view. |
100 uint32 RendererFrameNumber(); | 96 uint32 RendererFrameNumber(); |
101 | 97 |
102 // Called each time the RenderWidgetHost receives a new frame for display from | 98 // Called each time the RenderWidgetHost receives a new frame for display from |
103 // the renderer. | 99 // the renderer. |
104 void DidReceiveRendererFrame(); | 100 void DidReceiveRendererFrame(); |
105 | 101 |
106 // Notification that a resize or move session ended on the native widget. | 102 // Notification that a resize or move session ended on the native widget. |
107 void UpdateScreenInfo(gfx::NativeView view); | 103 void UpdateScreenInfo(gfx::NativeView view); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 virtual void GestureEventAck(const blink::WebGestureEvent& event, | 135 virtual void GestureEventAck(const blink::WebGestureEvent& event, |
140 InputEventAckState ack_result); | 136 InputEventAckState ack_result); |
141 | 137 |
142 // Create a platform specific SyntheticGestureTarget implementation that will | 138 // Create a platform specific SyntheticGestureTarget implementation that will |
143 // be used to inject synthetic input events. | 139 // be used to inject synthetic input events. |
144 virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget(); | 140 virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget(); |
145 | 141 |
146 // Return true if frame subscription is supported on this platform. | 142 // Return true if frame subscription is supported on this platform. |
147 virtual bool CanSubscribeFrame() const; | 143 virtual bool CanSubscribeFrame() const; |
148 | 144 |
149 // Create a BrowserAccessibilityManager for this view if it's possible to | 145 // Create a BrowserAccessibilityManager for this view. |
150 // create one and if one doesn't exist already. Some ports may not create | 146 virtual BrowserAccessibilityManager* CreateBrowserAccessibilityManager( |
151 // one depending on the current state. | 147 BrowserAccessibilityDelegate* delegate); |
152 virtual void CreateBrowserAccessibilityManagerIfNeeded(); | |
153 | 148 |
154 virtual void OnAccessibilitySetFocus(int acc_obj_id); | 149 virtual void AccessibilityShowMenu(const gfx::Point& point); |
155 virtual void AccessibilityShowMenu(int acc_obj_id); | |
156 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds); | 150 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds); |
157 | 151 |
158 virtual SkBitmap::Config PreferredReadbackFormat(); | 152 virtual SkBitmap::Config PreferredReadbackFormat(); |
159 | 153 |
160 // Informs that the focused DOM node has changed. | 154 // Informs that the focused DOM node has changed. |
161 virtual void FocusedNodeChanged(bool is_editable_node) {} | 155 virtual void FocusedNodeChanged(bool is_editable_node) {} |
162 | 156 |
163 virtual void OnSwapCompositorFrame(uint32 output_surface_id, | 157 virtual void OnSwapCompositorFrame(uint32 output_surface_id, |
164 scoped_ptr<cc::CompositorFrame> frame) {} | 158 scoped_ptr<cc::CompositorFrame> frame) {} |
165 | 159 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 // The orientation of the display the renderer is currently on. | 401 // The orientation of the display the renderer is currently on. |
408 gfx::Display::Rotation current_display_rotation_; | 402 gfx::Display::Rotation current_display_rotation_; |
409 | 403 |
410 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the | 404 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the |
411 // renderer. | 405 // renderer. |
412 bool pinch_zoom_enabled_; | 406 bool pinch_zoom_enabled_; |
413 | 407 |
414 private: | 408 private: |
415 void FlushInput(); | 409 void FlushInput(); |
416 | 410 |
417 // Manager of the tree representation of the WebKit render tree. | |
418 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | |
419 | |
420 gfx::Rect current_display_area_; | 411 gfx::Rect current_display_area_; |
421 | 412 |
422 uint32 renderer_frame_number_; | 413 uint32 renderer_frame_number_; |
423 | 414 |
424 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; | 415 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; |
425 | 416 |
426 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 417 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
427 }; | 418 }; |
428 | 419 |
429 } // namespace content | 420 } // namespace content |
430 | 421 |
431 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 422 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
OLD | NEW |