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/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "content/public/browser/page_navigator.h" | 14 #include "content/public/browser/page_navigator.h" |
15 #include "content/public/browser/save_page_type.h" | 15 #include "content/public/browser/save_page_type.h" |
16 #include "content/public/browser/web_ui.h" | 16 #include "content/public/browser/web_ui.h" |
17 #include "content/public/common/view_type.h" | |
18 #include "third_party/skia/include/core/SkColor.h" | 17 #include "third_party/skia/include/core/SkColor.h" |
19 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
20 #include "webkit/glue/window_open_disposition.h" | 19 #include "webkit/glue/window_open_disposition.h" |
21 | 20 |
22 namespace base { | 21 namespace base { |
23 class PropertyBag; | 22 class PropertyBag; |
24 class TimeTicks; | 23 class TimeTicks; |
25 } | 24 } |
26 | 25 |
27 namespace gfx { | 26 namespace gfx { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 virtual void SetDelegate(WebContentsDelegate* delegate) = 0; | 83 virtual void SetDelegate(WebContentsDelegate* delegate) = 0; |
85 | 84 |
86 // Gets the controller for this WebContents. | 85 // Gets the controller for this WebContents. |
87 virtual NavigationController& GetController() = 0; | 86 virtual NavigationController& GetController() = 0; |
88 virtual const NavigationController& GetController() const = 0; | 87 virtual const NavigationController& GetController() const = 0; |
89 | 88 |
90 // Returns the user browser context associated with this WebContents (via the | 89 // Returns the user browser context associated with this WebContents (via the |
91 // NavigationController). | 90 // NavigationController). |
92 virtual content::BrowserContext* GetBrowserContext() const = 0; | 91 virtual content::BrowserContext* GetBrowserContext() const = 0; |
93 | 92 |
94 // Allows overriding the type of this tab. | |
95 virtual void SetViewType(content::ViewType type) = 0; | |
96 virtual content::ViewType GetViewType() const = 0; | |
97 | |
98 // Gets the URL that is currently being displayed, if there is one. | 93 // Gets the URL that is currently being displayed, if there is one. |
99 virtual const GURL& GetURL() const = 0; | 94 virtual const GURL& GetURL() const = 0; |
100 | 95 |
101 // Return the currently active RenderProcessHost and RenderViewHost. Each of | 96 // Return the currently active RenderProcessHost and RenderViewHost. Each of |
102 // these may change over time. | 97 // these may change over time. |
103 virtual RenderProcessHost* GetRenderProcessHost() const = 0; | 98 virtual RenderProcessHost* GetRenderProcessHost() const = 0; |
104 | 99 |
105 // Gets the current RenderViewHost for this tab. | 100 // Gets the current RenderViewHost for this tab. |
106 virtual RenderViewHost* GetRenderViewHost() const = 0; | 101 virtual RenderViewHost* GetRenderViewHost() const = 0; |
107 | 102 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 // Focuses the location bar. | 375 // Focuses the location bar. |
381 virtual void SetFocusToLocationBar(bool select_all) = 0; | 376 virtual void SetFocusToLocationBar(bool select_all) = 0; |
382 | 377 |
383 // Does this have an opener associated with it? | 378 // Does this have an opener associated with it? |
384 virtual bool HasOpener() const = 0; | 379 virtual bool HasOpener() const = 0; |
385 }; | 380 }; |
386 | 381 |
387 } // namespace content | 382 } // namespace content |
388 | 383 |
389 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 384 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |