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

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

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

Powered by Google App Engine
This is Rietveld 408576698