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

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

Issue 10696173: Revert "Revert 146000 - Split out ContentViewCore from ContentView for embedders." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase number deux Created 8 years, 5 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 | Annotate | Revision Log
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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/port/browser/render_view_host_delegate_view.h" 9 #include "content/port/browser/render_view_host_delegate_view.h"
10 #include "content/public/browser/web_contents_view.h" 10 #include "content/public/browser/web_contents_view.h"
11 #include "content/browser/web_contents/web_contents_impl.h" 11 #include "content/browser/web_contents/web_contents_impl.h"
12 #include "content/public/browser/web_contents_view_delegate.h" 12 #include "content/public/browser/web_contents_view_delegate.h"
13 #include "content/public/common/context_menu_params.h" 13 #include "content/public/common/context_menu_params.h"
14 14
15 namespace content { 15 namespace content {
16 class ContentViewImpl; 16 class ContentViewCoreImpl;
17 17
18 // Android-specific implementation of the WebContentsView. 18 // Android-specific implementation of the WebContentsView.
19 class WebContentsViewAndroid : public WebContentsView, 19 class WebContentsViewAndroid : public WebContentsView,
20 public RenderViewHostDelegateView { 20 public RenderViewHostDelegateView {
21 public: 21 public:
22 WebContentsViewAndroid(WebContentsImpl* web_contents, 22 WebContentsViewAndroid(WebContentsImpl* web_contents,
23 WebContentsViewDelegate* delegate); 23 WebContentsViewDelegate* delegate);
24 virtual ~WebContentsViewAndroid(); 24 virtual ~WebContentsViewAndroid();
25 25
26 // Sets the interface to the view system. ContentViewImpl is owned 26 // Sets the interface to the view system. ContentViewCoreImpl is owned
27 // by its Java ContentView counterpart, whose lifetime is managed 27 // by its Java ContentViewCore counterpart, whose lifetime is managed
28 // by the UI frontend. 28 // by the UI frontend.
29 void SetContentView(ContentViewImpl* content_view); 29 void SetContentViewCore(ContentViewCoreImpl* content_view_core);
30 30
31 // WebContentsView implementation -------------------------------------------- 31 // WebContentsView implementation --------------------------------------------
32 32
33 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; 33 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE;
34 virtual RenderWidgetHostView* CreateViewForWidget( 34 virtual RenderWidgetHostView* CreateViewForWidget(
35 RenderWidgetHost* render_widget_host) OVERRIDE; 35 RenderWidgetHost* render_widget_host) OVERRIDE;
36 virtual gfx::NativeView GetNativeView() const OVERRIDE; 36 virtual gfx::NativeView GetNativeView() const OVERRIDE;
37 virtual gfx::NativeView GetContentNativeView() const OVERRIDE; 37 virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
38 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; 38 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE;
39 virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; 39 virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE;
(...skipping 27 matching lines...) Expand all
67 const gfx::ImageSkia& image, 67 const gfx::ImageSkia& image,
68 const gfx::Point& image_offset) OVERRIDE; 68 const gfx::Point& image_offset) OVERRIDE;
69 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; 69 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE;
70 virtual void GotFocus() OVERRIDE; 70 virtual void GotFocus() OVERRIDE;
71 virtual void TakeFocus(bool reverse) OVERRIDE; 71 virtual void TakeFocus(bool reverse) OVERRIDE;
72 72
73 private: 73 private:
74 // The WebContents whose contents we display. 74 // The WebContents whose contents we display.
75 WebContentsImpl* web_contents_; 75 WebContentsImpl* web_contents_;
76 76
77 // ContentViewImpl is our interface to the view system. 77 // ContentViewCoreImpl is our interface to the view system.
78 ContentViewImpl* content_view_; 78 ContentViewCoreImpl* content_view_core_;
79 79
80 // Interface for extensions to WebContentsView. Used to show the context menu. 80 // Interface for extensions to WebContentsView. Used to show the context menu.
81 scoped_ptr<WebContentsViewDelegate> delegate_; 81 scoped_ptr<WebContentsViewDelegate> delegate_;
82 82
83 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); 83 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid);
84 }; 84 };
85 85
86 } // namespace content 86 } // namespace content
87 87
88 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ 88 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698