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

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

Issue 2484793002: Remove access to WebContents in RWHVA::SynchronousFrameMetadata() (Closed)
Patch Set: Created 4 years, 1 month 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 "content/browser/accessibility/browser_accessibility_manager.h" 23 #include "content/browser/accessibility/browser_accessibility_manager.h"
24 #include "content/browser/android/content_view_core_impl_observer.h" 24 #include "content/browser/android/content_view_core_impl_observer.h"
25 #include "content/browser/renderer_host/delegated_frame_evictor.h" 25 #include "content/browser/renderer_host/delegated_frame_evictor.h"
26 #include "content/browser/renderer_host/ime_adapter_android.h" 26 #include "content/browser/renderer_host/ime_adapter_android.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_android_delegate .h"
28 #include "content/browser/renderer_host/render_widget_host_view_base.h" 29 #include "content/browser/renderer_host/render_widget_host_view_base.h"
29 #include "content/common/content_export.h" 30 #include "content/common/content_export.h"
30 #include "content/public/browser/readback_types.h" 31 #include "content/public/browser/readback_types.h"
31 #include "gpu/command_buffer/common/mailbox.h" 32 #include "gpu/command_buffer/common/mailbox.h"
32 #include "third_party/skia/include/core/SkColor.h" 33 #include "third_party/skia/include/core/SkColor.h"
33 #include "ui/android/view_android.h" 34 #include "ui/android/view_android.h"
34 #include "ui/android/window_android_observer.h" 35 #include "ui/android/window_android_observer.h"
35 #include "ui/events/gesture_detection/filtered_gesture_provider.h" 36 #include "ui/events/gesture_detection/filtered_gesture_provider.h"
36 #include "ui/gfx/geometry/size.h" 37 #include "ui/gfx/geometry/size.h"
37 #include "ui/gfx/geometry/vector2d_f.h" 38 #include "ui/gfx/geometry/vector2d_f.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // ----------------------------------------------------------------------------- 71 // -----------------------------------------------------------------------------
71 class CONTENT_EXPORT RenderWidgetHostViewAndroid 72 class CONTENT_EXPORT RenderWidgetHostViewAndroid
72 : public RenderWidgetHostViewBase, 73 : public RenderWidgetHostViewBase,
73 public ui::GestureProviderClient, 74 public ui::GestureProviderClient,
74 public ui::WindowAndroidObserver, 75 public ui::WindowAndroidObserver,
75 public DelegatedFrameEvictorClient, 76 public DelegatedFrameEvictorClient,
76 public StylusTextSelectorClient, 77 public StylusTextSelectorClient,
77 public ui::TouchSelectionControllerClient, 78 public ui::TouchSelectionControllerClient,
78 public content::ContentViewCoreImplObserver { 79 public content::ContentViewCoreImplObserver {
79 public: 80 public:
80 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, 81 RenderWidgetHostViewAndroid(
81 ContentViewCoreImpl* content_view_core); 82 RenderWidgetHostImpl* widget,
83 ContentViewCoreImpl* content_view_core,
84 RenderWidgetHostViewAndroidDelegate* delegate);
82 ~RenderWidgetHostViewAndroid() override; 85 ~RenderWidgetHostViewAndroid() override;
83 86
84 void Blur(); 87 void Blur();
85 88
86 // RenderWidgetHostView implementation. 89 // RenderWidgetHostView implementation.
87 bool OnMessageReceived(const IPC::Message& msg) override; 90 bool OnMessageReceived(const IPC::Message& msg) override;
88 void InitAsChild(gfx::NativeView parent_view) override; 91 void InitAsChild(gfx::NativeView parent_view) override;
89 void InitAsPopup(RenderWidgetHostView* parent_host_view, 92 void InitAsPopup(RenderWidgetHostView* parent_host_view,
90 const gfx::Rect& pos) override; 93 const gfx::Rect& pos) override;
91 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; 94 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 std::unique_ptr<ui::TouchSelectionController> selection_controller_; 349 std::unique_ptr<ui::TouchSelectionController> selection_controller_;
347 350
348 // Bounds to use if we have no backing ContentViewCore 351 // Bounds to use if we have no backing ContentViewCore
349 gfx::Rect default_bounds_; 352 gfx::Rect default_bounds_;
350 353
351 const bool using_browser_compositor_; 354 const bool using_browser_compositor_;
352 std::unique_ptr<SynchronousCompositorHost> sync_compositor_; 355 std::unique_ptr<SynchronousCompositorHost> sync_compositor_;
353 356
354 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_; 357 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_;
355 358
359 std::unique_ptr<RenderWidgetHostViewAndroidDelegate> delegate_;
360
356 size_t locks_on_frame_count_; 361 size_t locks_on_frame_count_;
357 bool observing_root_window_; 362 bool observing_root_window_;
358 363
359 struct LastFrameInfo { 364 struct LastFrameInfo {
360 LastFrameInfo(uint32_t compositor_frame_sink_id, 365 LastFrameInfo(uint32_t compositor_frame_sink_id,
361 cc::CompositorFrame output_frame); 366 cc::CompositorFrame output_frame);
362 ~LastFrameInfo(); 367 ~LastFrameInfo();
363 uint32_t compositor_frame_sink_id; 368 uint32_t compositor_frame_sink_id;
364 cc::CompositorFrame frame; 369 cc::CompositorFrame frame;
365 }; 370 };
366 371
367 std::unique_ptr<LastFrameInfo> last_frame_info_; 372 std::unique_ptr<LastFrameInfo> last_frame_info_;
368 373
369 // The last scroll offset of the view. 374 // The last scroll offset of the view.
370 gfx::Vector2dF last_scroll_offset_; 375 gfx::Vector2dF last_scroll_offset_;
371 376
372 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 377 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
373 378
374 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 379 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
375 }; 380 };
376 381
377 } // namespace content 382 } // namespace content
378 383
379 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 384 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698