| 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_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 virtual void OnSwapCompositorFrame( | 167 virtual void OnSwapCompositorFrame( |
| 168 uint32 output_surface_id, | 168 uint32 output_surface_id, |
| 169 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; | 169 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; |
| 170 virtual void OnOverscrolled(gfx::Vector2dF accumulated_overscroll, | 170 virtual void OnOverscrolled(gfx::Vector2dF accumulated_overscroll, |
| 171 gfx::Vector2dF current_fling_velocity) OVERRIDE; | 171 gfx::Vector2dF current_fling_velocity) OVERRIDE; |
| 172 virtual void DidStopFlinging() OVERRIDE; | 172 virtual void DidStopFlinging() OVERRIDE; |
| 173 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, | 173 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, |
| 174 const SkBitmap& zoomed_bitmap) OVERRIDE; | 174 const SkBitmap& zoomed_bitmap) OVERRIDE; |
| 175 virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() | 175 virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() |
| 176 OVERRIDE; | 176 OVERRIDE; |
| 177 virtual void LockSurfaceForCopy() OVERRIDE; |
| 178 virtual void UnlockSurfaceForCopy() OVERRIDE; |
| 177 | 179 |
| 178 // Implementation of BrowserAccessibilityDelegate: | 180 // Implementation of BrowserAccessibilityDelegate: |
| 179 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; | 181 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; |
| 180 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; | 182 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; |
| 181 virtual void AccessibilityScrollToMakeVisible( | 183 virtual void AccessibilityScrollToMakeVisible( |
| 182 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; | 184 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; |
| 183 virtual void AccessibilityScrollToPoint( | 185 virtual void AccessibilityScrollToPoint( |
| 184 int acc_obj_id, gfx::Point point) OVERRIDE; | 186 int acc_obj_id, gfx::Point point) OVERRIDE; |
| 185 virtual void AccessibilitySetTextSelection( | 187 virtual void AccessibilitySetTextSelection( |
| 186 int acc_obj_id, int start_offset, int end_offset) OVERRIDE; | 188 int acc_obj_id, int start_offset, int end_offset) OVERRIDE; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 210 void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event); | 212 void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event); |
| 211 void SendGestureEvent(const blink::WebGestureEvent& event); | 213 void SendGestureEvent(const blink::WebGestureEvent& event); |
| 212 void SendBeginFrame(const cc::BeginFrameArgs& args); | 214 void SendBeginFrame(const cc::BeginFrameArgs& args); |
| 213 | 215 |
| 214 void OnTextInputStateChanged(const ViewHostMsg_TextInputState_Params& params); | 216 void OnTextInputStateChanged(const ViewHostMsg_TextInputState_Params& params); |
| 215 void OnDidChangeBodyBackgroundColor(SkColor color); | 217 void OnDidChangeBodyBackgroundColor(SkColor color); |
| 216 void OnStartContentIntent(const GURL& content_url); | 218 void OnStartContentIntent(const GURL& content_url); |
| 217 void OnSetNeedsBeginFrame(bool enabled); | 219 void OnSetNeedsBeginFrame(bool enabled); |
| 218 void OnSmartClipDataExtracted(const base::string16& result); | 220 void OnSmartClipDataExtracted(const base::string16& result); |
| 219 | 221 |
| 220 void LockResources(); | |
| 221 void UnlockResources(); | |
| 222 | |
| 223 long GetNativeImeAdapter(); | 222 long GetNativeImeAdapter(); |
| 224 | 223 |
| 225 void WasResized(); | 224 void WasResized(); |
| 226 | 225 |
| 227 void GetScaledContentBitmap( | 226 void GetScaledContentBitmap( |
| 228 float scale, | 227 float scale, |
| 229 SkBitmap::Config bitmap_config, | 228 SkBitmap::Config bitmap_config, |
| 230 gfx::Rect src_subrect, | 229 gfx::Rect src_subrect, |
| 231 const base::Callback<void(bool, const SkBitmap&)>& result_callback); | 230 const base::Callback<void(bool, const SkBitmap&)>& result_callback); |
| 232 | 231 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 const base::Callback<void(bool, const SkBitmap&)>& callback, | 284 const base::Callback<void(bool, const SkBitmap&)>& callback, |
| 286 scoped_ptr<cc::CopyOutputResult> result); | 285 scoped_ptr<cc::CopyOutputResult> result); |
| 287 | 286 |
| 288 // DevTools ScreenCast support for Android WebView. | 287 // DevTools ScreenCast support for Android WebView. |
| 289 void SynchronousCopyContents( | 288 void SynchronousCopyContents( |
| 290 const gfx::Rect& src_subrect_in_pixel, | 289 const gfx::Rect& src_subrect_in_pixel, |
| 291 const gfx::Size& dst_size_in_pixel, | 290 const gfx::Size& dst_size_in_pixel, |
| 292 const base::Callback<void(bool, const SkBitmap&)>& callback, | 291 const base::Callback<void(bool, const SkBitmap&)>& callback, |
| 293 const SkBitmap::Config config); | 292 const SkBitmap::Config config); |
| 294 | 293 |
| 294 // If we have locks on a frame during a ContentViewCore swap or a context |
| 295 // lost, the frame is no longer valid and we can safely release all the locks. |
| 296 // Use this method to release all the locks. |
| 297 void ReleaseLocksOnSurface(); |
| 298 |
| 295 // The model object. | 299 // The model object. |
| 296 RenderWidgetHostImpl* host_; | 300 RenderWidgetHostImpl* host_; |
| 297 | 301 |
| 298 // Used to track whether this render widget needs a BeginFrame. | 302 // Used to track whether this render widget needs a BeginFrame. |
| 299 bool needs_begin_frame_; | 303 bool needs_begin_frame_; |
| 300 | 304 |
| 301 bool is_showing_; | 305 bool is_showing_; |
| 302 | 306 |
| 303 // ContentViewCoreImpl is our interface to the view system. | 307 // ContentViewCoreImpl is our interface to the view system. |
| 304 ContentViewCoreImpl* content_view_core_; | 308 ContentViewCoreImpl* content_view_core_; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 354 |
| 351 // Size to use if we have no backing ContentViewCore | 355 // Size to use if we have no backing ContentViewCore |
| 352 gfx::Size default_size_; | 356 gfx::Size default_size_; |
| 353 | 357 |
| 354 const bool using_synchronous_compositor_; | 358 const bool using_synchronous_compositor_; |
| 355 | 359 |
| 356 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; | 360 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; |
| 357 | 361 |
| 358 bool using_delegated_renderer_; | 362 bool using_delegated_renderer_; |
| 359 | 363 |
| 364 size_t locks_on_frame_count_; |
| 365 |
| 360 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 366 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 361 }; | 367 }; |
| 362 | 368 |
| 363 } // namespace content | 369 } // namespace content |
| 364 | 370 |
| 365 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 371 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |