| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // dependent web contents views. The WebContents uses this interface to talk to | 30 // dependent web contents views. The WebContents uses this interface to talk to |
| 31 // them. View-related messages will also get forwarded directly to this class | 31 // them. View-related messages will also get forwarded directly to this class |
| 32 // from RenderViewHost via RenderViewHostDelegate::View. | 32 // from RenderViewHost via RenderViewHostDelegate::View. |
| 33 // | 33 // |
| 34 // It contains a small amount of logic with respect to creating new sub-view | 34 // It contains a small amount of logic with respect to creating new sub-view |
| 35 // that should be the same for all platforms. | 35 // that should be the same for all platforms. |
| 36 class WebContentsView : public RenderViewHostDelegate::View { | 36 class WebContentsView : public RenderViewHostDelegate::View { |
| 37 public: | 37 public: |
| 38 virtual ~WebContentsView() {} | 38 virtual ~WebContentsView() {} |
| 39 | 39 |
| 40 // Creates the appropriate type of WebContentsView for the current system. |
| 41 // The return value is a new heap allocated view with ownership passing to |
| 42 // the caller. |
| 43 static WebContentsView* Create(WebContents* web_contents); |
| 44 |
| 40 virtual WebContents* GetWebContents() = 0; | 45 virtual WebContents* GetWebContents() = 0; |
| 41 | 46 |
| 42 virtual void CreateView() = 0; | 47 virtual void CreateView() = 0; |
| 43 | 48 |
| 44 // Sets up the View that holds the rendered web page, receives messages for | 49 // Sets up the View that holds the rendered web page, receives messages for |
| 45 // it and contains page plugins. The host view should be sized to the current | 50 // it and contains page plugins. The host view should be sized to the current |
| 46 // size of the WebContents. | 51 // size of the WebContents. |
| 47 virtual RenderWidgetHostView* CreateViewForWidget( | 52 virtual RenderWidgetHostView* CreateViewForWidget( |
| 48 RenderWidgetHost* render_widget_host) = 0; | 53 RenderWidgetHost* render_widget_host) = 0; |
| 49 | 54 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 192 |
| 188 // These maps hold on to the widgets that we created on behalf of the | 193 // These maps hold on to the widgets that we created on behalf of the |
| 189 // renderer that haven't shown yet. | 194 // renderer that haven't shown yet. |
| 190 typedef std::map<int, RenderWidgetHostView*> PendingWidgetViews; | 195 typedef std::map<int, RenderWidgetHostView*> PendingWidgetViews; |
| 191 PendingWidgetViews pending_widget_views_; | 196 PendingWidgetViews pending_widget_views_; |
| 192 | 197 |
| 193 DISALLOW_COPY_AND_ASSIGN(WebContentsView); | 198 DISALLOW_COPY_AND_ASSIGN(WebContentsView); |
| 194 }; | 199 }; |
| 195 | 200 |
| 196 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_ | 201 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_ |
| OLD | NEW |