Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 174323003: Expose locks for CopyFromCompositingSurface/CopyFromBackingStore API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
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 // Only use for when the content is forcibly being evicted, such as when
295 // ContentViewCore is gone or when the context has been lost.
piman 2014/03/04 19:09:55 nit: can you describe what it does rather than whe
powei 2014/03/04 20:49:22 Done.
296 void ReleaseLocksOnSurface();
297
295 // The model object. 298 // The model object.
296 RenderWidgetHostImpl* host_; 299 RenderWidgetHostImpl* host_;
297 300
298 // Used to track whether this render widget needs a BeginFrame. 301 // Used to track whether this render widget needs a BeginFrame.
299 bool needs_begin_frame_; 302 bool needs_begin_frame_;
300 303
301 bool is_showing_; 304 bool is_showing_;
302 305
303 // ContentViewCoreImpl is our interface to the view system. 306 // ContentViewCoreImpl is our interface to the view system.
304 ContentViewCoreImpl* content_view_core_; 307 ContentViewCoreImpl* content_view_core_;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; 359 scoped_ptr<DelegatedFrameEvictor> frame_evictor_;
357 360
358 bool using_delegated_renderer_; 361 bool using_delegated_renderer_;
359 362
360 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 363 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
361 }; 364 };
362 365
363 } // namespace content 366 } // namespace content
364 367
365 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 368 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698