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

Side by Side Diff: content/browser/web_contents/web_contents_view_android.h

Issue 2490383002: Revert of Resolves layering violation in SynchronousCompositorHost creation (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_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 11 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
12 #include "content/browser/web_contents/web_contents_view.h" 12 #include "content/browser/web_contents/web_contents_view.h"
13 #include "content/public/browser/web_contents_view_delegate.h" 13 #include "content/public/browser/web_contents_view_delegate.h"
14 #include "content/public/common/context_menu_params.h" 14 #include "content/public/common/context_menu_params.h"
15 #include "content/public/common/drop_data.h" 15 #include "content/public/common/drop_data.h"
16 #include "ui/android/view_android.h" 16 #include "ui/android/view_android.h"
17 #include "ui/gfx/geometry/rect_f.h" 17 #include "ui/gfx/geometry/rect_f.h"
18 18
19 namespace content { 19 namespace content {
20 class ContentViewCoreImpl; 20 class ContentViewCoreImpl;
21 class RenderWidgetHostViewAndroid;
22 class SynchronousCompositorClient;
23 class WebContentsImpl; 21 class WebContentsImpl;
24 22
25 // Android-specific implementation of the WebContentsView. 23 // Android-specific implementation of the WebContentsView.
26 class WebContentsViewAndroid : public WebContentsView, 24 class WebContentsViewAndroid : public WebContentsView,
27 public RenderViewHostDelegateView { 25 public RenderViewHostDelegateView {
28 public: 26 public:
29 WebContentsViewAndroid(WebContentsImpl* web_contents, 27 WebContentsViewAndroid(WebContentsImpl* web_contents,
30 WebContentsViewDelegate* delegate); 28 WebContentsViewDelegate* delegate);
31 ~WebContentsViewAndroid() override; 29 ~WebContentsViewAndroid() override;
32 30
33 // Sets the interface to the view system. ContentViewCoreImpl is owned 31 // Sets the interface to the view system. ContentViewCoreImpl is owned
34 // by its Java ContentViewCore counterpart, whose lifetime is managed 32 // by its Java ContentViewCore counterpart, whose lifetime is managed
35 // by the UI frontend. 33 // by the UI frontend.
36 void SetContentViewCore(ContentViewCoreImpl* content_view_core); 34 void SetContentViewCore(ContentViewCoreImpl* content_view_core);
37 35
38 void set_synchronous_compositor_client(SynchronousCompositorClient* client) {
39 synchronous_compositor_client_ = client;
40 }
41
42 SynchronousCompositorClient* synchronous_compositor_client() const {
43 return synchronous_compositor_client_;
44 }
45
46 // WebContentsView implementation -------------------------------------------- 36 // WebContentsView implementation --------------------------------------------
47 gfx::NativeView GetNativeView() const override; 37 gfx::NativeView GetNativeView() const override;
48 gfx::NativeView GetContentNativeView() const override; 38 gfx::NativeView GetContentNativeView() const override;
49 gfx::NativeWindow GetTopLevelNativeWindow() const override; 39 gfx::NativeWindow GetTopLevelNativeWindow() const override;
50 void GetScreenInfo(ScreenInfo* screen_info) const override; 40 void GetScreenInfo(ScreenInfo* screen_info) const override;
51 void GetContainerBounds(gfx::Rect* out) const override; 41 void GetContainerBounds(gfx::Rect* out) const override;
52 void SizeContents(const gfx::Size& size) override; 42 void SizeContents(const gfx::Size& size) override;
53 void Focus() override; 43 void Focus() override;
54 void SetInitialFocus() override; 44 void SetInitialFocus() override;
55 void StoreFocus() override; 45 void StoreFocus() override;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 96
107 // ContentViewCoreImpl is our interface to the view system. 97 // ContentViewCoreImpl is our interface to the view system.
108 ContentViewCoreImpl* content_view_core_; 98 ContentViewCoreImpl* content_view_core_;
109 99
110 // Interface for extensions to WebContentsView. Used to show the context menu. 100 // Interface for extensions to WebContentsView. Used to show the context menu.
111 std::unique_ptr<WebContentsViewDelegate> delegate_; 101 std::unique_ptr<WebContentsViewDelegate> delegate_;
112 102
113 // The native view associated with the contents of the web. 103 // The native view associated with the contents of the web.
114 ui::ViewAndroid view_; 104 ui::ViewAndroid view_;
115 105
116 // Interface used to get notified of events from the synchronous compositor.
117 SynchronousCompositorClient* synchronous_compositor_client_;
118
119 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); 106 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid);
120 }; 107 };
121 108
122 } // namespace content 109 } // namespace content
123 110
124 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ 111 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_android.cc ('k') | content/browser/web_contents/web_contents_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698