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

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

Issue 8760024: Cross-process postMessage (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Current checkpoint Created 8 years, 12 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
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_CONTROLLER_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 11 matching lines...) Expand all
22 #include "content/public/common/referrer.h" 22 #include "content/public/common/referrer.h"
23 23
24 class NavigationEntry; 24 class NavigationEntry;
25 class SessionStorageNamespace; 25 class SessionStorageNamespace;
26 class SiteInstance; 26 class SiteInstance;
27 class TabContents; 27 class TabContents;
28 struct ViewHostMsg_FrameNavigate_Params; 28 struct ViewHostMsg_FrameNavigate_Params;
29 29
30 namespace content { 30 namespace content {
31 class BrowserContext; 31 class BrowserContext;
32 class ContentFrame;
32 struct LoadCommittedDetails; 33 struct LoadCommittedDetails;
33 struct Referrer; 34 struct Referrer;
34 } 35 }
35 36
36 // A NavigationController maintains the back-forward list for a single tab and 37 // A NavigationController maintains the back-forward list for a single tab and
37 // manages all navigation within that list. 38 // manages all navigation within that list.
38 // 39 //
39 // The NavigationController also owns all TabContents for the tab. This is to 40 // The NavigationController also owns all TabContents for the tab. This is to
40 // make sure that we have at most one TabContents instance per type. 41 // make sure that we have at most one TabContents instance per type.
41 class CONTENT_EXPORT NavigationController { 42 class CONTENT_EXPORT NavigationController {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void LoadURL(const GURL& url, 182 void LoadURL(const GURL& url,
182 const content::Referrer& referrer, 183 const content::Referrer& referrer,
183 content::PageTransition type, 184 content::PageTransition type,
184 const std::string& extra_headers); 185 const std::string& extra_headers);
185 186
186 // Same as LoadURL, but for renderer-initiated navigations. This state is 187 // Same as LoadURL, but for renderer-initiated navigations. This state is
187 // important for tracking whether to display pending URLs. 188 // important for tracking whether to display pending URLs.
188 void LoadURLFromRenderer(const GURL& url, 189 void LoadURLFromRenderer(const GURL& url,
189 const content::Referrer& referrer, 190 const content::Referrer& referrer,
190 content::PageTransition type, 191 content::PageTransition type,
191 const std::string& extra_headers); 192 const std::string& extra_headers,
193 content::ContentFrame* opener = NULL);
192 194
193 // Behaves like LoadURL() and LoadURLFromRenderer() but marks the new 195 // Behaves like LoadURL() and LoadURLFromRenderer() but marks the new
194 // navigation as being transferred from one RVH to another. In this case the 196 // navigation as being transferred from one RVH to another. In this case the
195 // browser can recycle the old request once the new renderer wants to 197 // browser can recycle the old request once the new renderer wants to
196 // navigate. 198 // navigate.
197 // |transferred_global_request_id| identifies the request ID of the old 199 // |transferred_global_request_id| identifies the request ID of the old
198 // request. 200 // request.
199 void TransferURL( 201 void TransferURL(
200 const GURL& url, 202 const GURL& url,
201 const content::Referrer& referrer, 203 const content::Referrer& referrer,
202 content::PageTransition transition, 204 content::PageTransition transition,
203 const std::string& extra_headers, 205 const std::string& extra_headers,
206 content::ContentFrame* opener,
204 const GlobalRequestID& transferred_global_request_id, 207 const GlobalRequestID& transferred_global_request_id,
205 bool is_renderer_initiated); 208 bool is_renderer_initiated);
206 209
207 // Loads the current page if this NavigationController was restored from 210 // Loads the current page if this NavigationController was restored from
208 // history and the current page has not loaded yet. 211 // history and the current page has not loaded yet.
209 void LoadIfNecessary(); 212 void LoadIfNecessary();
210 213
211 // Renavigation -------------------------------------------------------------- 214 // Renavigation --------------------------------------------------------------
212 215
213 // Navigation relative to the "current entry" 216 // Navigation relative to the "current entry"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 353
351 // Creates navigation entry and translates the virtual url to a real one. 354 // Creates navigation entry and translates the virtual url to a real one.
352 // Used when navigating to a new URL using LoadURL. Extra headers are 355 // Used when navigating to a new URL using LoadURL. Extra headers are
353 // separated by \n. 356 // separated by \n.
354 static NavigationEntry* CreateNavigationEntry( 357 static NavigationEntry* CreateNavigationEntry(
355 const GURL& url, 358 const GURL& url,
356 const content::Referrer& referrer, 359 const content::Referrer& referrer,
357 content::PageTransition transition, 360 content::PageTransition transition,
358 bool is_renderer_initiated, 361 bool is_renderer_initiated,
359 const std::string& extra_headers, 362 const std::string& extra_headers,
360 content::BrowserContext* browser_context); 363 content::BrowserContext* browser_context,
364 content::ContentFrame* opener = NULL);
361 365
362 private: 366 private:
363 class RestoreHelper; 367 class RestoreHelper;
364 friend class RestoreHelper; 368 friend class RestoreHelper;
365 friend class TabContents; // For invoking OnReservedPageIDRange. 369 friend class TabContents; // For invoking OnReservedPageIDRange.
366 370
367 // Classifies the given renderer navigation (see the NavigationType enum). 371 // Classifies the given renderer navigation (see the NavigationType enum).
368 content::NavigationType ClassifyNavigation( 372 content::NavigationType ClassifyNavigation(
369 const ViewHostMsg_FrameNavigate_Params& params) const; 373 const ViewHostMsg_FrameNavigate_Params& params) const;
370 374
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 static size_t max_entry_count_for_testing_; 508 static size_t max_entry_count_for_testing_;
505 509
506 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), 510 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE),
507 // NO_RELOAD otherwise. 511 // NO_RELOAD otherwise.
508 ReloadType pending_reload_; 512 ReloadType pending_reload_;
509 513
510 DISALLOW_COPY_AND_ASSIGN(NavigationController); 514 DISALLOW_COPY_AND_ASSIGN(NavigationController);
511 }; 515 };
512 516
513 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ 517 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/browser/tab_contents/interstitial_page.cc ('k') | content/browser/tab_contents/navigation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698