| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "content/browser/renderer_host/render_view_host_delegate.h" | 12 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 13 #include "content/common/content_export.h" |
| 13 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
| 14 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
| 15 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
| 16 | 17 |
| 17 class RenderViewHost; | 18 class RenderViewHost; |
| 18 class RenderWidgetHost; | 19 class RenderWidgetHost; |
| 19 class RenderWidgetHostView; | 20 class RenderWidgetHostView; |
| 20 class TabContents; | 21 class TabContents; |
| 21 | 22 |
| 22 // The TabContentsView is an interface that is implemented by the platform- | 23 // The TabContentsView is an interface that is implemented by the platform- |
| 23 // dependent web contents views. The TabContents uses this interface to talk to | 24 // dependent web contents views. The TabContents uses this interface to talk to |
| 24 // them. View-related messages will also get forwarded directly to this class | 25 // them. View-related messages will also get forwarded directly to this class |
| 25 // from RenderViewHost via RenderViewHostDelegate::View. | 26 // from RenderViewHost via RenderViewHostDelegate::View. |
| 26 class TabContentsView : public RenderViewHostDelegate::View { | 27 class CONTENT_EXPORT TabContentsView : public RenderViewHostDelegate::View { |
| 27 public: | 28 public: |
| 28 virtual ~TabContentsView(); | 29 virtual ~TabContentsView(); |
| 29 | 30 |
| 30 virtual void CreateView(const gfx::Size& initial_size) = 0; | 31 virtual void CreateView(const gfx::Size& initial_size) = 0; |
| 31 | 32 |
| 32 // Sets up the View that holds the rendered web page, receives messages for | 33 // Sets up the View that holds the rendered web page, receives messages for |
| 33 // it and contains page plugins. The host view should be sized to the current | 34 // it and contains page plugins. The host view should be sized to the current |
| 34 // size of the TabContents. | 35 // size of the TabContents. |
| 35 virtual RenderWidgetHostView* CreateViewForWidget( | 36 virtual RenderWidgetHostView* CreateViewForWidget( |
| 36 RenderWidgetHost* render_widget_host) = 0; | 37 RenderWidgetHost* render_widget_host) = 0; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 virtual void GetViewBounds(gfx::Rect* out) const = 0; | 118 virtual void GetViewBounds(gfx::Rect* out) const = 0; |
| 118 | 119 |
| 119 protected: | 120 protected: |
| 120 TabContentsView(); // Abstract interface. | 121 TabContentsView(); // Abstract interface. |
| 121 | 122 |
| 122 private: | 123 private: |
| 123 DISALLOW_COPY_AND_ASSIGN(TabContentsView); | 124 DISALLOW_COPY_AND_ASSIGN(TabContentsView); |
| 124 }; | 125 }; |
| 125 | 126 |
| 126 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ | 127 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ |
| OLD | NEW |