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

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

Issue 2021003002: LockCompositingSurface to make sure frame is not evicted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // See comments in render_widget_host_view.h about this class and its members. 66 // See comments in render_widget_host_view.h about this class and its members.
67 // ----------------------------------------------------------------------------- 67 // -----------------------------------------------------------------------------
68 class CONTENT_EXPORT RenderWidgetHostViewAndroid 68 class CONTENT_EXPORT RenderWidgetHostViewAndroid
69 : public RenderWidgetHostViewBase, 69 : public RenderWidgetHostViewBase,
70 public cc::SurfaceFactoryClient, 70 public cc::SurfaceFactoryClient,
71 public ui::GestureProviderClient, 71 public ui::GestureProviderClient,
72 public ui::WindowAndroidObserver, 72 public ui::WindowAndroidObserver,
73 public DelegatedFrameEvictorClient, 73 public DelegatedFrameEvictorClient,
74 public StylusTextSelectorClient, 74 public StylusTextSelectorClient,
75 public ui::TouchSelectionControllerClient, 75 public ui::TouchSelectionControllerClient,
76 public content::ContentViewCoreImplObserver { 76 public content::ContentViewCoreImplObserver,
77 public base::SupportsWeakPtr<RenderWidgetHostViewAndroid> {
no sievers 2016/06/01 22:32:06 There is already a |weak_ptr_factory_| in this cla
sivag 2016/06/02 14:34:50 Done.
77 public: 78 public:
78 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, 79 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget,
79 ContentViewCoreImpl* content_view_core); 80 ContentViewCoreImpl* content_view_core);
80 ~RenderWidgetHostViewAndroid() override; 81 ~RenderWidgetHostViewAndroid() override;
81 82
82 void Blur(); 83 void Blur();
83 84
84 // RenderWidgetHostView implementation. 85 // RenderWidgetHostView implementation.
85 bool OnMessageReceived(const IPC::Message& msg) override; 86 bool OnMessageReceived(const IPC::Message& msg) override;
86 void InitAsChild(gfx::NativeView parent_view) override; 87 void InitAsChild(gfx::NativeView parent_view) override;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 void ShowInternal(); 278 void ShowInternal();
278 void HideInternal(); 279 void HideInternal();
279 void AttachLayers(); 280 void AttachLayers();
280 void RemoveLayers(); 281 void RemoveLayers();
281 282
282 void UpdateBackgroundColor(SkColor color); 283 void UpdateBackgroundColor(SkColor color);
283 284
284 // Called after async screenshot task completes. Scales and crops the result 285 // Called after async screenshot task completes. Scales and crops the result
285 // of the copy. 286 // of the copy.
286 static void PrepareTextureCopyOutputResult( 287 static void PrepareTextureCopyOutputResult(
288 base::WeakPtr<RenderWidgetHostViewAndroid> rwhva,
287 const gfx::Size& dst_size_in_pixel, 289 const gfx::Size& dst_size_in_pixel,
288 SkColorType color_type, 290 SkColorType color_type,
289 const base::TimeTicks& start_time, 291 const base::TimeTicks& start_time,
290 const ReadbackRequestCallback& callback, 292 const ReadbackRequestCallback& callback,
291 std::unique_ptr<cc::CopyOutputResult> result); 293 std::unique_ptr<cc::CopyOutputResult> result);
292 294
293 // DevTools ScreenCast support for Android WebView. 295 // DevTools ScreenCast support for Android WebView.
294 void SynchronousCopyContents(const gfx::Rect& src_subrect_in_pixel, 296 void SynchronousCopyContents(const gfx::Rect& src_subrect_in_pixel,
295 const gfx::Size& dst_size_in_pixel, 297 const gfx::Size& dst_size_in_pixel,
296 const ReadbackRequestCallback& callback, 298 const ReadbackRequestCallback& callback,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 gfx::Vector2dF last_scroll_offset_; 408 gfx::Vector2dF last_scroll_offset_;
407 409
408 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 410 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
409 411
410 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 412 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
411 }; 413 };
412 414
413 } // namespace content 415 } // namespace content
414 416
415 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 417 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698