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

Side by Side Diff: content/browser/tab_contents/navigation_entry_impl.h

Issue 9146028: Define the public interface for content browser SiteInstance. This interface is implemented by th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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) 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_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "content/browser/site_instance_impl.h"
11 #include "content/public/browser/favicon_status.h" 12 #include "content/public/browser/favicon_status.h"
12 #include "content/public/browser/global_request_id.h" 13 #include "content/public/browser/global_request_id.h"
13 #include "content/public/browser/navigation_entry.h" 14 #include "content/public/browser/navigation_entry.h"
14 #include "content/public/browser/ssl_status.h" 15 #include "content/public/browser/ssl_status.h"
15 16
16 class SiteInstance;
17
18 namespace content { 17 namespace content {
19 18
20 class CONTENT_EXPORT NavigationEntryImpl 19 class CONTENT_EXPORT NavigationEntryImpl
21 : public NON_EXPORTED_BASE(NavigationEntry) { 20 : public NON_EXPORTED_BASE(NavigationEntry) {
22 public: 21 public:
23 static NavigationEntryImpl* FromNavigationEntry(NavigationEntry* entry); 22 static NavigationEntryImpl* FromNavigationEntry(NavigationEntry* entry);
24 23
25 NavigationEntryImpl(); 24 NavigationEntryImpl();
26 NavigationEntryImpl(SiteInstance* instance, 25 NavigationEntryImpl(SiteInstanceImpl* instance,
27 int page_id, 26 int page_id,
28 const GURL& url, 27 const GURL& url,
29 const Referrer& referrer, 28 const Referrer& referrer,
30 const string16& title, 29 const string16& title,
31 PageTransition transition_type, 30 PageTransition transition_type,
32 bool is_renderer_initiated); 31 bool is_renderer_initiated);
33 virtual ~NavigationEntryImpl(); 32 virtual ~NavigationEntryImpl();
34 33
35 // NavigationEntry implementation: 34 // NavigationEntry implementation:
36 virtual int GetUniqueID() const OVERRIDE; 35 virtual int GetUniqueID() const OVERRIDE;
(...skipping 27 matching lines...) Expand all
64 unique_id_ = unique_id; 63 unique_id_ = unique_id;
65 } 64 }
66 65
67 // The SiteInstance tells us how to share sub-processes when the tab type is 66 // The SiteInstance tells us how to share sub-processes when the tab type is
68 // TAB_CONTENTS_WEB. This will be NULL otherwise. This is a reference counted 67 // TAB_CONTENTS_WEB. This will be NULL otherwise. This is a reference counted
69 // pointer to a shared site instance. 68 // pointer to a shared site instance.
70 // 69 //
71 // Note that the SiteInstance should usually not be changed after it is set, 70 // Note that the SiteInstance should usually not be changed after it is set,
72 // but this may happen if the NavigationEntry was cloned and needs to use a 71 // but this may happen if the NavigationEntry was cloned and needs to use a
73 // different SiteInstance. 72 // different SiteInstance.
74 void set_site_instance(SiteInstance* site_instance); 73 void set_site_instance(SiteInstanceImpl* site_instance);
75 SiteInstance* site_instance() const { 74 SiteInstanceImpl* site_instance() const {
76 return site_instance_; 75 return site_instance_.get();
77 } 76 }
78 77
79 void set_page_type(PageType page_type) { 78 void set_page_type(PageType page_type) {
80 page_type_ = page_type; 79 page_type_ = page_type;
81 } 80 }
82 81
83 bool has_virtual_url() const { 82 bool has_virtual_url() const {
84 return !virtual_url_.is_empty(); 83 return !virtual_url_.is_empty();
85 } 84 }
86 85
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 144
146 private: 145 private:
147 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 146 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
148 // Session/Tab restore save portions of this class so that it can be recreated 147 // Session/Tab restore save portions of this class so that it can be recreated
149 // later. If you add a new field that needs to be persisted you'll have to 148 // later. If you add a new field that needs to be persisted you'll have to
150 // update SessionService/TabRestoreService appropriately. 149 // update SessionService/TabRestoreService appropriately.
151 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 150 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
152 151
153 // See the accessors above for descriptions. 152 // See the accessors above for descriptions.
154 int unique_id_; 153 int unique_id_;
155 scoped_refptr<SiteInstance> site_instance_; 154 scoped_refptr<SiteInstanceImpl> site_instance_;
156 PageType page_type_; 155 PageType page_type_;
157 GURL url_; 156 GURL url_;
158 Referrer referrer_; 157 Referrer referrer_;
159 GURL virtual_url_; 158 GURL virtual_url_;
160 bool update_virtual_url_with_url_; 159 bool update_virtual_url_with_url_;
161 string16 title_; 160 string16 title_;
162 FaviconStatus favicon_; 161 FaviconStatus favicon_;
163 std::string content_state_; 162 std::string content_state_;
164 int32 page_id_; 163 int32 page_id_;
165 SSLStatus ssl_; 164 SSLStatus ssl_;
(...skipping 24 matching lines...) Expand all
190 // is transferred to the new process, this is cleared and the request 189 // is transferred to the new process, this is cleared and the request
191 // continues as normal. 190 // continues as normal.
192 GlobalRequestID transferred_global_request_id_; 191 GlobalRequestID transferred_global_request_id_;
193 192
194 // Copy and assignment is explicitly allowed for this class. 193 // Copy and assignment is explicitly allowed for this class.
195 }; 194 };
196 195
197 } // namespace content 196 } // namespace content
198 197
199 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ 198 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698