| 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_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "content/browser/download/save_package.h" | 12 #include "content/browser/download/save_package.h" |
| 13 #include "content/browser/webui/web_ui.h" | 13 #include "content/browser/webui/web_ui.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/browser/page_navigator.h" | 15 #include "content/public/browser/page_navigator.h" |
| 16 #include "content/public/common/view_type.h" | 16 #include "content/public/common/view_type.h" |
| 17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 18 #include "webkit/glue/window_open_disposition.h" | 18 #include "webkit/glue/window_open_disposition.h" |
| 19 | 19 |
| 20 class InterstitialPage; | 20 class InterstitialPage; |
| 21 class NavigationController; | |
| 22 class RenderViewHost; | 21 class RenderViewHost; |
| 23 class RenderViewHostManager; | 22 class RenderViewHostManager; |
| 24 class RenderWidgetHostView; | 23 class RenderWidgetHostView; |
| 25 class SessionStorageNamespace; | 24 class SessionStorageNamespace; |
| 26 class SiteInstance; | 25 class SiteInstance; |
| 27 // TODO(jam): of course we will have to rename TabContentsView etc to use | 26 // TODO(jam): of course we will have to rename TabContentsView etc to use |
| 28 // WebContents. | 27 // WebContents. |
| 29 class TabContentsView; | 28 class TabContentsView; |
| 30 | 29 |
| 31 namespace base { | 30 namespace base { |
| 32 class PropertyBag; | 31 class PropertyBag; |
| 33 class TimeTicks; | 32 class TimeTicks; |
| 34 } | 33 } |
| 35 | 34 |
| 36 namespace gfx { | 35 namespace gfx { |
| 37 class Rect; | 36 class Rect; |
| 38 } | 37 } |
| 39 | 38 |
| 40 namespace net { | 39 namespace net { |
| 41 struct LoadStateWithParam; | 40 struct LoadStateWithParam; |
| 42 } | 41 } |
| 43 | 42 |
| 44 namespace content { | 43 namespace content { |
| 45 | 44 |
| 46 class BrowserContext; | 45 class BrowserContext; |
| 46 class NavigationController; |
| 47 class RenderProcessHost; | 47 class RenderProcessHost; |
| 48 class WebContentsDelegate; | 48 class WebContentsDelegate; |
| 49 struct RendererPreferences; | 49 struct RendererPreferences; |
| 50 struct SSLStatus; | 50 struct SSLStatus; |
| 51 | 51 |
| 52 // Describes what goes in the main content area of a tab. | 52 // Describes what goes in the main content area of a tab. |
| 53 class WebContents : public PageNavigator { | 53 class WebContents : public PageNavigator { |
| 54 public: | 54 public: |
| 55 // |base_tab_contents| is used if we want to size the new tab contents view | 55 // |base_tab_contents| is used if we want to size the new tab contents view |
| 56 // based on an existing tab contents view. This can be NULL if not needed. | 56 // based on an existing tab contents view. This can be NULL if not needed. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 74 // extra data they may wish to associate with the tab. Returns a pointer | 74 // extra data they may wish to associate with the tab. Returns a pointer |
| 75 // rather than a reference since the PropertyAccessors expect this. | 75 // rather than a reference since the PropertyAccessors expect this. |
| 76 virtual const base::PropertyBag* GetPropertyBag() const = 0; | 76 virtual const base::PropertyBag* GetPropertyBag() const = 0; |
| 77 virtual base::PropertyBag* GetPropertyBag() = 0; | 77 virtual base::PropertyBag* GetPropertyBag() = 0; |
| 78 | 78 |
| 79 // Gets/Sets the delegate. | 79 // Gets/Sets the delegate. |
| 80 virtual WebContentsDelegate* GetDelegate() = 0; | 80 virtual WebContentsDelegate* GetDelegate() = 0; |
| 81 virtual void SetDelegate(WebContentsDelegate* delegate) = 0; | 81 virtual void SetDelegate(WebContentsDelegate* delegate) = 0; |
| 82 | 82 |
| 83 // Gets the controller for this tab contents. | 83 // Gets the controller for this tab contents. |
| 84 virtual ::NavigationController& GetController() = 0; | 84 virtual NavigationController& GetController() = 0; |
| 85 virtual const ::NavigationController& GetController() const = 0; | 85 virtual const NavigationController& GetController() const = 0; |
| 86 | 86 |
| 87 // Returns the user browser context associated with this WebContents (via the | 87 // Returns the user browser context associated with this WebContents (via the |
| 88 // NavigationController). | 88 // NavigationController). |
| 89 virtual content::BrowserContext* GetBrowserContext() const = 0; | 89 virtual content::BrowserContext* GetBrowserContext() const = 0; |
| 90 | 90 |
| 91 // Allows overriding the type of this tab. | 91 // Allows overriding the type of this tab. |
| 92 virtual void SetViewType(content::ViewType type) = 0; | 92 virtual void SetViewType(content::ViewType type) = 0; |
| 93 virtual content::ViewType GetViewType() const = 0; | 93 virtual content::ViewType GetViewType() const = 0; |
| 94 | 94 |
| 95 // Gets the URL that is currently being displayed, if there is one. | 95 // Gets the URL that is currently being displayed, if there is one. |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // to see what it should do. | 352 // to see what it should do. |
| 353 virtual bool FocusLocationBarByDefault() = 0; | 353 virtual bool FocusLocationBarByDefault() = 0; |
| 354 | 354 |
| 355 // Focuses the location bar. | 355 // Focuses the location bar. |
| 356 virtual void SetFocusToLocationBar(bool select_all) = 0; | 356 virtual void SetFocusToLocationBar(bool select_all) = 0; |
| 357 }; | 357 }; |
| 358 | 358 |
| 359 } // namespace content | 359 } // namespace content |
| 360 | 360 |
| 361 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 361 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |