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_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/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/public/browser/page_navigator.h" | 13 #include "content/public/browser/page_navigator.h" |
14 #include "content/public/browser/save_page_type.h" | 14 #include "content/public/browser/save_page_type.h" |
15 #include "content/public/browser/web_ui.h" | 15 #include "content/public/browser/web_ui.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 RenderViewHost; | 21 class RenderViewHost; |
22 class RenderWidgetHostView; | 22 class RenderWidgetHostView; |
23 class SessionStorageNamespace; | 23 class SessionStorageNamespace; |
24 class SiteInstance; | |
25 | 24 |
26 namespace base { | 25 namespace base { |
27 class PropertyBag; | 26 class PropertyBag; |
28 class TimeTicks; | 27 class TimeTicks; |
29 } | 28 } |
30 | 29 |
31 namespace gfx { | 30 namespace gfx { |
32 class Rect; | 31 class Rect; |
33 class Size; | 32 class Size; |
34 } | 33 } |
35 | 34 |
36 namespace net { | 35 namespace net { |
37 struct LoadStateWithParam; | 36 struct LoadStateWithParam; |
38 } | 37 } |
39 | 38 |
40 namespace content { | 39 namespace content { |
41 | 40 |
42 class BrowserContext; | 41 class BrowserContext; |
43 class NavigationController; | 42 class NavigationController; |
44 class RenderProcessHost; | 43 class RenderProcessHost; |
45 class WebContentsDelegate; | 44 class WebContentsDelegate; |
46 struct RendererPreferences; | 45 struct RendererPreferences; |
| 46 class SiteInstance; |
47 struct SSLStatus; | 47 struct SSLStatus; |
48 // TODO(jam): of course we will have to rename WebContentsView etc to use | 48 // TODO(jam): of course we will have to rename WebContentsView etc to use |
49 // WebContents. | 49 // WebContents. |
50 class WebContentsView; | 50 class WebContentsView; |
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 virtual const string16& GetTitle() const = 0; | 129 virtual const string16& GetTitle() const = 0; |
130 | 130 |
131 // The max page ID for any page that the current SiteInstance has loaded in | 131 // The max page ID for any page that the current SiteInstance has loaded in |
132 // this TabContents. Page IDs are specific to a given SiteInstance and | 132 // this TabContents. Page IDs are specific to a given SiteInstance and |
133 // TabContents, corresponding to a specific RenderView in the renderer. | 133 // TabContents, corresponding to a specific RenderView in the renderer. |
134 // Page IDs increase with each new page that is loaded by a tab. | 134 // Page IDs increase with each new page that is loaded by a tab. |
135 virtual int32 GetMaxPageID() = 0; | 135 virtual int32 GetMaxPageID() = 0; |
136 | 136 |
137 // The max page ID for any page that the given SiteInstance has loaded in | 137 // The max page ID for any page that the given SiteInstance has loaded in |
138 // this TabContents. | 138 // this TabContents. |
139 virtual int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance) = 0; | 139 virtual int32 GetMaxPageIDForSiteInstance( |
| 140 SiteInstance* site_instance) = 0; |
140 | 141 |
141 // Returns the SiteInstance associated with the current page. | 142 // Returns the SiteInstance associated with the current page. |
142 virtual SiteInstance* GetSiteInstance() const = 0; | 143 virtual SiteInstance* GetSiteInstance() const = 0; |
143 | 144 |
144 // Returns the SiteInstance for the pending navigation, if any. Otherwise | 145 // Returns the SiteInstance for the pending navigation, if any. Otherwise |
145 // returns the current SiteInstance. | 146 // returns the current SiteInstance. |
146 virtual SiteInstance* GetPendingSiteInstance() const = 0; | 147 virtual SiteInstance* GetPendingSiteInstance() const = 0; |
147 | 148 |
148 // Return whether this tab contents is loading a resource. | 149 // Return whether this tab contents is loading a resource. |
149 virtual bool IsLoading() const = 0; | 150 virtual bool IsLoading() const = 0; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 // to see what it should do. | 363 // to see what it should do. |
363 virtual bool FocusLocationBarByDefault() = 0; | 364 virtual bool FocusLocationBarByDefault() = 0; |
364 | 365 |
365 // Focuses the location bar. | 366 // Focuses the location bar. |
366 virtual void SetFocusToLocationBar(bool select_all) = 0; | 367 virtual void SetFocusToLocationBar(bool select_all) = 0; |
367 }; | 368 }; |
368 | 369 |
369 } // namespace content | 370 } // namespace content |
370 | 371 |
371 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 372 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |