OLD | NEW |
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/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.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/port/browser/web_contents_view_port.h" | 11 #include "content/port/browser/web_contents_view_port.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 #include "ui/gfx/rect_f.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 class ContentViewCoreImpl; | 17 class ContentViewCoreImpl; |
17 | 18 |
18 // Android-specific implementation of the WebContentsView. | 19 // Android-specific implementation of the WebContentsView. |
19 class WebContentsViewAndroid : public WebContentsViewPort, | 20 class WebContentsViewAndroid : public WebContentsViewPort, |
20 public RenderViewHostDelegateView { | 21 public RenderViewHostDelegateView { |
21 public: | 22 public: |
22 WebContentsViewAndroid(WebContentsImpl* web_contents, | 23 WebContentsViewAndroid(WebContentsImpl* web_contents, |
23 WebContentsViewDelegate* delegate); | 24 WebContentsViewDelegate* delegate); |
24 virtual ~WebContentsViewAndroid(); | 25 virtual ~WebContentsViewAndroid(); |
25 | 26 |
26 // Sets the interface to the view system. ContentViewCoreImpl is owned | 27 // Sets the interface to the view system. ContentViewCoreImpl is owned |
27 // by its Java ContentViewCore counterpart, whose lifetime is managed | 28 // by its Java ContentViewCore counterpart, whose lifetime is managed |
28 // by the UI frontend. | 29 // by the UI frontend. |
29 void SetContentViewCore(ContentViewCoreImpl* content_view_core); | 30 void SetContentViewCore(ContentViewCoreImpl* content_view_core); |
30 | 31 |
| 32 #if defined(GOOGLE_TV) |
31 void RequestExternalVideoSurface(int player_id); | 33 void RequestExternalVideoSurface(int player_id); |
| 34 void NotifyGeometryChange(int player_id, const gfx::RectF& rect); |
| 35 #endif |
32 | 36 |
33 // WebContentsView implementation -------------------------------------------- | 37 // WebContentsView implementation -------------------------------------------- |
34 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 38 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
35 virtual gfx::NativeView GetContentNativeView() const OVERRIDE; | 39 virtual gfx::NativeView GetContentNativeView() const OVERRIDE; |
36 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; | 40 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; |
37 virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; | 41 virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; |
38 virtual void OnTabCrashed(base::TerminationStatus status, | 42 virtual void OnTabCrashed(base::TerminationStatus status, |
39 int error_code) OVERRIDE; | 43 int error_code) OVERRIDE; |
40 virtual void SizeContents(const gfx::Size& size) OVERRIDE; | 44 virtual void SizeContents(const gfx::Size& size) OVERRIDE; |
41 virtual void Focus() OVERRIDE; | 45 virtual void Focus() OVERRIDE; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 89 |
86 // Interface for extensions to WebContentsView. Used to show the context menu. | 90 // Interface for extensions to WebContentsView. Used to show the context menu. |
87 scoped_ptr<WebContentsViewDelegate> delegate_; | 91 scoped_ptr<WebContentsViewDelegate> delegate_; |
88 | 92 |
89 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); | 93 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); |
90 }; | 94 }; |
91 | 95 |
92 } // namespace content | 96 } // namespace content |
93 | 97 |
94 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ | 98 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ |
OLD | NEW |