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

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

Issue 2811083002: Move frame eviction into components (Closed)
Patch Set: Rebase Created 3 years, 8 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
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <queue> 13 #include <queue>
14 14
15 #include "base/callback.h" 15 #include "base/callback.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/i18n/rtl.h" 17 #include "base/i18n/rtl.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/process/process.h" 20 #include "base/process/process.h"
21 #include "cc/input/selection.h" 21 #include "cc/input/selection.h"
22 #include "cc/output/begin_frame_args.h" 22 #include "cc/output/begin_frame_args.h"
23 #include "cc/scheduler/begin_frame_source.h" 23 #include "cc/scheduler/begin_frame_source.h"
24 #include "components/viz/frame_sinks/frame_evictor.h"
24 #include "content/browser/accessibility/browser_accessibility_manager.h" 25 #include "content/browser/accessibility/browser_accessibility_manager.h"
25 #include "content/browser/android/content_view_core_impl_observer.h" 26 #include "content/browser/android/content_view_core_impl_observer.h"
26 #include "content/browser/renderer_host/delegated_frame_evictor.h"
27 #include "content/browser/renderer_host/input/stylus_text_selector.h" 27 #include "content/browser/renderer_host/input/stylus_text_selector.h"
28 #include "content/browser/renderer_host/render_widget_host_view_base.h" 28 #include "content/browser/renderer_host/render_widget_host_view_base.h"
29 #include "content/browser/renderer_host/text_input_manager.h" 29 #include "content/browser/renderer_host/text_input_manager.h"
30 #include "content/common/content_export.h" 30 #include "content/common/content_export.h"
31 #include "content/public/browser/readback_types.h" 31 #include "content/public/browser/readback_types.h"
32 #include "gpu/command_buffer/common/mailbox.h" 32 #include "gpu/command_buffer/common/mailbox.h"
33 #include "third_party/skia/include/core/SkColor.h" 33 #include "third_party/skia/include/core/SkColor.h"
34 #include "ui/android/delegated_frame_host_android.h" 34 #include "ui/android/delegated_frame_host_android.h"
35 #include "ui/android/view_android.h" 35 #include "ui/android/view_android.h"
36 #include "ui/android/view_client.h" 36 #include "ui/android/view_client.h"
(...skipping 20 matching lines...) Expand all
57 struct NativeWebKeyboardEvent; 57 struct NativeWebKeyboardEvent;
58 58
59 // ----------------------------------------------------------------------------- 59 // -----------------------------------------------------------------------------
60 // See comments in render_widget_host_view.h about this class and its members. 60 // See comments in render_widget_host_view.h about this class and its members.
61 // ----------------------------------------------------------------------------- 61 // -----------------------------------------------------------------------------
62 class CONTENT_EXPORT RenderWidgetHostViewAndroid 62 class CONTENT_EXPORT RenderWidgetHostViewAndroid
63 : public RenderWidgetHostViewBase, 63 : public RenderWidgetHostViewBase,
64 public ui::GestureProviderClient, 64 public ui::GestureProviderClient,
65 public ui::ViewClient, 65 public ui::ViewClient,
66 public ui::WindowAndroidObserver, 66 public ui::WindowAndroidObserver,
67 public DelegatedFrameEvictorClient, 67 public viz::FrameEvictorClient,
68 public StylusTextSelectorClient, 68 public StylusTextSelectorClient,
69 public ui::TouchSelectionControllerClient, 69 public ui::TouchSelectionControllerClient,
70 public content::ContentViewCoreImplObserver, 70 public content::ContentViewCoreImplObserver,
71 public content::TextInputManager::Observer, 71 public content::TextInputManager::Observer,
72 public ui::DelegatedFrameHostAndroid::Client, 72 public ui::DelegatedFrameHostAndroid::Client,
73 public cc::BeginFrameObserver { 73 public cc::BeginFrameObserver {
74 public: 74 public:
75 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, 75 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget,
76 ContentViewCoreImpl* content_view_core); 76 ContentViewCoreImpl* content_view_core);
77 ~RenderWidgetHostViewAndroid() override; 77 ~RenderWidgetHostViewAndroid() override;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void OnDetachCompositor() override; 195 void OnDetachCompositor() override;
196 void OnAnimate(base::TimeTicks begin_frame_time) override; 196 void OnAnimate(base::TimeTicks begin_frame_time) override;
197 void OnActivityStopped() override; 197 void OnActivityStopped() override;
198 void OnActivityStarted() override; 198 void OnActivityStarted() override;
199 199
200 // content::ContentViewCoreImplObserver implementation. 200 // content::ContentViewCoreImplObserver implementation.
201 void OnContentViewCoreDestroyed() override; 201 void OnContentViewCoreDestroyed() override;
202 void OnAttachedToWindow() override; 202 void OnAttachedToWindow() override;
203 void OnDetachedFromWindow() override; 203 void OnDetachedFromWindow() override;
204 204
205 // DelegatedFrameEvictor implementation 205 // viz::FrameEvictor implementation
206 void EvictDelegatedFrame() override; 206 void EvictDelegatedFrame() override;
207 207
208 // StylusTextSelectorClient implementation. 208 // StylusTextSelectorClient implementation.
209 void OnStylusSelectBegin(float x0, float y0, float x1, float y1) override; 209 void OnStylusSelectBegin(float x0, float y0, float x1, float y1) override;
210 void OnStylusSelectUpdate(float x, float y) override; 210 void OnStylusSelectUpdate(float x, float y) override;
211 void OnStylusSelectEnd() override {}; 211 void OnStylusSelectEnd() override {};
212 void OnStylusSelectTap(base::TimeTicks time, float x, float y) override; 212 void OnStylusSelectTap(base::TimeTicks time, float x, float y) override;
213 213
214 // ui::TouchSelectionControllerClient implementation. 214 // ui::TouchSelectionControllerClient implementation.
215 bool SupportsAnimation() const override; 215 bool SupportsAnimation() const override;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 std::unique_ptr<ui::TouchSelectionController> selection_controller_; 397 std::unique_ptr<ui::TouchSelectionController> selection_controller_;
398 398
399 // Bounds to use if we have no backing ContentViewCore 399 // Bounds to use if we have no backing ContentViewCore
400 gfx::Rect default_bounds_; 400 gfx::Rect default_bounds_;
401 401
402 const bool using_browser_compositor_; 402 const bool using_browser_compositor_;
403 std::unique_ptr<SynchronousCompositorHost> sync_compositor_; 403 std::unique_ptr<SynchronousCompositorHost> sync_compositor_;
404 404
405 SynchronousCompositorClient* synchronous_compositor_client_; 405 SynchronousCompositorClient* synchronous_compositor_client_;
406 406
407 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_; 407 std::unique_ptr<viz::FrameEvictor> frame_evictor_;
408 408
409 bool observing_root_window_; 409 bool observing_root_window_;
410 410
411 // The last scroll offset of the view. 411 // The last scroll offset of the view.
412 gfx::Vector2dF last_scroll_offset_; 412 gfx::Vector2dF last_scroll_offset_;
413 413
414 float prev_top_shown_pix_; 414 float prev_top_shown_pix_;
415 float prev_bottom_shown_pix_; 415 float prev_bottom_shown_pix_;
416 416
417 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink_ = 417 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink_ =
418 nullptr; 418 nullptr;
419 419
420 base::ObserverList<DestructionObserver> destruction_observers_; 420 base::ObserverList<DestructionObserver> destruction_observers_;
421 421
422 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 422 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
423 423
424 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 424 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
425 }; 425 };
426 426
427 } // namespace content 427 } // namespace content
428 428
429 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 429 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698