Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Side by Side Diff: content/public/browser/web_contents.h

Issue 10409088: Get rid of the RenderViewType concept in content, since it was only used by Chrome. Store the enum… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // pass in NULL which will cause a new SessionStorageNamespace to be created. 59 // pass in NULL which will cause a new SessionStorageNamespace to be created.
61 CONTENT_EXPORT static WebContents* Create( 60 CONTENT_EXPORT static WebContents* Create(
62 BrowserContext* browser_context, 61 BrowserContext* browser_context,
63 SiteInstance* site_instance, 62 SiteInstance* site_instance,
64 int routing_id, 63 int routing_id,
65 const WebContents* base_web_contents, 64 const WebContents* base_web_contents,
66 SessionStorageNamespace* session_storage_namespace); 65 SessionStorageNamespace* session_storage_namespace);
67 66
68 // Returns a WebContents that wraps the RenderViewHost, or NULL if the 67 // Returns a WebContents that wraps the RenderViewHost, or NULL if the
69 // render view host's delegate isn't a WebContents. 68 // render view host's delegate isn't a WebContents.
70 CONTENT_EXPORT static WebContents* FromRenderViewHost(RenderViewHost* rvh); 69 CONTENT_EXPORT static WebContents* FromRenderViewHost(
70 const RenderViewHost* rvh);
71 71
72 virtual ~WebContents() {} 72 virtual ~WebContents() {}
73 73
74 // Intrinsic tab state ------------------------------------------------------- 74 // Intrinsic tab state -------------------------------------------------------
75 75
76 // Returns the property bag for this WebContents, where callers can add 76 // Returns the property bag for this WebContents, where callers can add
77 // extra data they may wish to associate with the tab. Returns a pointer 77 // extra data they may wish to associate with the tab. Returns a pointer
78 // rather than a reference since the PropertyAccessors expect this. 78 // rather than a reference since the PropertyAccessors expect this.
79 virtual const base::PropertyBag* GetPropertyBag() const = 0; 79 virtual const base::PropertyBag* GetPropertyBag() const = 0;
80 virtual base::PropertyBag* GetPropertyBag() = 0; 80 virtual base::PropertyBag* GetPropertyBag() = 0;
81 81
82 // Gets/Sets the delegate. 82 // Gets/Sets the delegate.
83 virtual WebContentsDelegate* GetDelegate() = 0; 83 virtual WebContentsDelegate* GetDelegate() = 0;
84 virtual void SetDelegate(WebContentsDelegate* delegate) = 0; 84 virtual void SetDelegate(WebContentsDelegate* delegate) = 0;
85 85
86 // Gets the controller for this WebContents. 86 // Gets the controller for this WebContents.
87 virtual NavigationController& GetController() = 0; 87 virtual NavigationController& GetController() = 0;
88 virtual const NavigationController& GetController() const = 0; 88 virtual const NavigationController& GetController() const = 0;
89 89
90 // Returns the user browser context associated with this WebContents (via the 90 // Returns the user browser context associated with this WebContents (via the
91 // NavigationController). 91 // NavigationController).
92 virtual content::BrowserContext* GetBrowserContext() const = 0; 92 virtual content::BrowserContext* GetBrowserContext() const = 0;
93 93
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. 94 // Gets the URL that is currently being displayed, if there is one.
99 virtual const GURL& GetURL() const = 0; 95 virtual const GURL& GetURL() const = 0;
100 96
101 // Return the currently active RenderProcessHost and RenderViewHost. Each of 97 // Return the currently active RenderProcessHost and RenderViewHost. Each of
102 // these may change over time. 98 // these may change over time.
103 virtual RenderProcessHost* GetRenderProcessHost() const = 0; 99 virtual RenderProcessHost* GetRenderProcessHost() const = 0;
104 100
105 // Gets the current RenderViewHost for this tab. 101 // Gets the current RenderViewHost for this tab.
106 virtual RenderViewHost* GetRenderViewHost() const = 0; 102 virtual RenderViewHost* GetRenderViewHost() const = 0;
107 103
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 // Focuses the location bar. 376 // Focuses the location bar.
381 virtual void SetFocusToLocationBar(bool select_all) = 0; 377 virtual void SetFocusToLocationBar(bool select_all) = 0;
382 378
383 // Does this have an opener associated with it? 379 // Does this have an opener associated with it?
384 virtual bool HasOpener() const = 0; 380 virtual bool HasOpener() const = 0;
385 }; 381 };
386 382
387 } // namespace content 383 } // namespace content
388 384
389 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 385 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698