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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 virtual void GetViewBounds(gfx::Rect* out) const = 0; | 121 virtual void GetViewBounds(gfx::Rect* out) const = 0; |
121 | 122 |
122 protected: | 123 protected: |
123 TabContentsView(); // Abstract interface. | 124 TabContentsView(); // Abstract interface. |
124 | 125 |
125 private: | 126 private: |
126 DISALLOW_COPY_AND_ASSIGN(TabContentsView); | 127 DISALLOW_COPY_AND_ASSIGN(TabContentsView); |
127 }; | 128 }; |
128 | 129 |
129 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ | 130 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ |
OLD | NEW |