| 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 #include "ui/gfx/rect_f.h" | 
|   15  |   15  | 
|   16 namespace content { |   16 namespace content { | 
 |   17 class CompositorProvider; | 
|   17 class ContentViewCoreImpl; |   18 class ContentViewCoreImpl; | 
|   18  |   19  | 
|   19 // Android-specific implementation of the WebContentsView. |   20 // Android-specific implementation of the WebContentsView. | 
|   20 class WebContentsViewAndroid : public WebContentsViewPort, |   21 class WebContentsViewAndroid : public WebContentsViewPort, | 
|   21                                public RenderViewHostDelegateView { |   22                                public RenderViewHostDelegateView { | 
|   22  public: |   23  public: | 
|   23   WebContentsViewAndroid(WebContentsImpl* web_contents, |   24   WebContentsViewAndroid(WebContentsImpl* web_contents, | 
|   24                          WebContentsViewDelegate* delegate); |   25                          WebContentsViewDelegate* delegate); | 
|   25   virtual ~WebContentsViewAndroid(); |   26   virtual ~WebContentsViewAndroid(); | 
|   26  |   27  | 
|   27   // Sets the interface to the view system. ContentViewCoreImpl is owned |   28   // Sets the interface to the view system. ContentViewCoreImpl is owned | 
|   28   // by its Java ContentViewCore counterpart, whose lifetime is managed |   29   // by its Java ContentViewCore counterpart, whose lifetime is managed | 
|   29   // by the UI frontend. |   30   // by the UI frontend. | 
|   30   void SetContentViewCore(ContentViewCoreImpl* content_view_core); |   31   void SetContentViewCore(ContentViewCoreImpl* content_view_core); | 
|   31  |   32  | 
 |   33   void SetCompositorProvider(CompositorProvider* compositor_provider); | 
 |   34  | 
|   32 #if defined(GOOGLE_TV) |   35 #if defined(GOOGLE_TV) | 
|   33   void NotifyExternalSurface(int player_id, |   36   void NotifyExternalSurface(int player_id, | 
|   34                              bool is_request, |   37                              bool is_request, | 
|   35                              const gfx::RectF& rect); |   38                              const gfx::RectF& rect); | 
|   36 #endif |   39 #endif | 
|   37  |   40  | 
|   38   // WebContentsView implementation -------------------------------------------- |   41   // WebContentsView implementation -------------------------------------------- | 
|   39   virtual gfx::NativeView GetNativeView() const OVERRIDE; |   42   virtual gfx::NativeView GetNativeView() const OVERRIDE; | 
|   40   virtual gfx::NativeView GetContentNativeView() const OVERRIDE; |   43   virtual gfx::NativeView GetContentNativeView() const OVERRIDE; | 
|   41   virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; |   44   virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   83  private: |   86  private: | 
|   84   // The WebContents whose contents we display. |   87   // The WebContents whose contents we display. | 
|   85   WebContentsImpl* web_contents_; |   88   WebContentsImpl* web_contents_; | 
|   86  |   89  | 
|   87   // ContentViewCoreImpl is our interface to the view system. |   90   // ContentViewCoreImpl is our interface to the view system. | 
|   88   ContentViewCoreImpl* content_view_core_; |   91   ContentViewCoreImpl* content_view_core_; | 
|   89  |   92  | 
|   90   // Interface for extensions to WebContentsView. Used to show the context menu. |   93   // Interface for extensions to WebContentsView. Used to show the context menu. | 
|   91   scoped_ptr<WebContentsViewDelegate> delegate_; |   94   scoped_ptr<WebContentsViewDelegate> delegate_; | 
|   92  |   95  | 
 |   96   // Pointer is not owned by this class. | 
 |   97   CompositorProvider* compositor_provider_; | 
 |   98  | 
|   93   DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); |   99   DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); | 
|   94 }; |  100 }; | 
|   95  |  101  | 
|   96 } // namespace content |  102 } // namespace content | 
|   97  |  103  | 
|   98 #endif  // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ |  104 #endif  // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ | 
| OLD | NEW |