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

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

Issue 10038026: TabContents -> WebContentsImpl, part 12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 10 matching lines...) Expand all
21 namespace content { 21 namespace content {
22 class NavigationEntryImpl; 22 class NavigationEntryImpl;
23 struct LoadCommittedDetails; 23 struct LoadCommittedDetails;
24 class SiteInstance; 24 class SiteInstance;
25 } 25 }
26 26
27 class CONTENT_EXPORT NavigationControllerImpl 27 class CONTENT_EXPORT NavigationControllerImpl
28 : public NON_EXPORTED_BASE(content::NavigationController) { 28 : public NON_EXPORTED_BASE(content::NavigationController) {
29 public: 29 public:
30 NavigationControllerImpl( 30 NavigationControllerImpl(
31 WebContentsImpl* tab_contents, 31 WebContentsImpl* web_contents,
32 content::BrowserContext* browser_context, 32 content::BrowserContext* browser_context,
33 SessionStorageNamespaceImpl* session_storage_namespace); 33 SessionStorageNamespaceImpl* session_storage_namespace);
34 virtual ~NavigationControllerImpl(); 34 virtual ~NavigationControllerImpl();
35 35
36 // NavigationController implementation: 36 // NavigationController implementation:
37 virtual content::WebContents* GetWebContents() const OVERRIDE; 37 virtual content::WebContents* GetWebContents() const OVERRIDE;
38 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; 38 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE;
39 virtual void SetBrowserContext( 39 virtual void SetBrowserContext(
40 content::BrowserContext* browser_context) OVERRIDE; 40 content::BrowserContext* browser_context) OVERRIDE;
41 virtual void Restore( 41 virtual void Restore(
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // transient: any navigation causes it to be removed and discarded. 117 // transient: any navigation causes it to be removed and discarded.
118 // The NavigationController becomes the owner of |entry| and deletes it when 118 // The NavigationController becomes the owner of |entry| and deletes it when
119 // it discards it. This is useful with interstitial page that need to be 119 // it discards it. This is useful with interstitial page that need to be
120 // represented as an entry, but should go away when the user navigates away 120 // represented as an entry, but should go away when the user navigates away
121 // from them. 121 // from them.
122 // Note that adding a transient entry does not change the active contents. 122 // Note that adding a transient entry does not change the active contents.
123 void AddTransientEntry(content::NavigationEntryImpl* entry); 123 void AddTransientEntry(content::NavigationEntryImpl* entry);
124 124
125 // WebContentsImpl ----------------------------------------------------------- 125 // WebContentsImpl -----------------------------------------------------------
126 126
127 WebContentsImpl* tab_contents() const { 127 WebContentsImpl* web_contents() const {
128 // This currently returns the active tab contents which should be renamed to 128 return web_contents_;
129 // tab_contents.
130 return tab_contents_;
131 } 129 }
132 130
133 // Called when a document has been loaded in a frame. 131 // Called when a document has been loaded in a frame.
134 void DocumentLoadedInFrame(); 132 void DocumentLoadedInFrame();
135 133
136 // For use by WebContentsImpl ------------------------------------------------ 134 // For use by WebContentsImpl ------------------------------------------------
137 135
138 // Handles updating the navigation state after the renderer has navigated. 136 // Handles updating the navigation state after the renderer has navigated.
139 // This is used by the WebContentsImpl. 137 // This is used by the WebContentsImpl.
140 // 138 //
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // new entry (created by LoadURL). 289 // new entry (created by LoadURL).
292 int pending_entry_index_; 290 int pending_entry_index_;
293 291
294 // The index for the entry that is shown until a navigation occurs. This is 292 // The index for the entry that is shown until a navigation occurs. This is
295 // used for interstitial pages. -1 if there are no such entry. 293 // used for interstitial pages. -1 if there are no such entry.
296 // Note that this entry really appears in the list of entries, but only 294 // Note that this entry really appears in the list of entries, but only
297 // temporarily (until the next navigation). Any index pointing to an entry 295 // temporarily (until the next navigation). Any index pointing to an entry
298 // after the transient entry will become invalid if you navigate forward. 296 // after the transient entry will become invalid if you navigate forward.
299 int transient_entry_index_; 297 int transient_entry_index_;
300 298
301 // The tab contents associated with the controller. Possibly NULL during 299 // The WebContents associated with the controller. Possibly NULL during
302 // setup. 300 // setup.
303 WebContentsImpl* tab_contents_; 301 WebContentsImpl* web_contents_;
304 302
305 // The max restored page ID in this controller, if it was restored. We must 303 // The max restored page ID in this controller, if it was restored. We must
306 // store this so that WebContentsImpl can tell any renderer in charge of one 304 // store this so that WebContentsImpl can tell any renderer in charge of one
307 // of the restored entries to update its max page ID. 305 // of the restored entries to update its max page ID.
308 int32 max_restored_page_id_; 306 int32 max_restored_page_id_;
309 307
310 // Manages the SSL security UI 308 // Manages the SSL security UI
311 SSLManager ssl_manager_; 309 SSLManager ssl_manager_;
312 310
313 // Whether we need to be reloaded when made active. 311 // Whether we need to be reloaded when made active.
314 bool needs_reload_; 312 bool needs_reload_;
315 313
316 // The time ticks at which the last document was loaded. 314 // The time ticks at which the last document was loaded.
317 base::TimeTicks last_document_loaded_; 315 base::TimeTicks last_document_loaded_;
318 316
319 // The session storage id that any (indirectly) owned RenderView should use. 317 // The session storage id that any (indirectly) owned RenderView should use.
320 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; 318 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_;
321 319
322 // The maximum number of entries that a navigation controller can store. 320 // The maximum number of entries that a navigation controller can store.
323 static size_t max_entry_count_for_testing_; 321 static size_t max_entry_count_for_testing_;
324 322
325 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), 323 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE),
326 // NO_RELOAD otherwise. 324 // NO_RELOAD otherwise.
327 ReloadType pending_reload_; 325 ReloadType pending_reload_;
328 326
329 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); 327 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
330 }; 328 };
331 329
332 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ 330 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698