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

Side by Side Diff: components/sessions/content/content_serialized_navigation_builder.cc

Issue 1104603002: Pick frame to navigate in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit test Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "components/sessions/content/content_serialized_navigation_builder.h" 5 #include "components/sessions/content/content_serialized_navigation_builder.h"
6 6
7 #include "components/sessions/serialized_navigation_entry.h" 7 #include "components/sessions/serialized_navigation_entry.h"
8 #include "content/public/browser/browser_context.h" 8 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/favicon_status.h" 9 #include "content/public/browser/favicon_status.h"
10 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
(...skipping 16 matching lines...) Expand all
27 navigation.virtual_url_ = entry.GetVirtualURL(); 27 navigation.virtual_url_ = entry.GetVirtualURL();
28 navigation.title_ = entry.GetTitle(); 28 navigation.title_ = entry.GetTitle();
29 navigation.encoded_page_state_ = entry.GetPageState().ToEncodedData(); 29 navigation.encoded_page_state_ = entry.GetPageState().ToEncodedData();
30 navigation.transition_type_ = entry.GetTransitionType(); 30 navigation.transition_type_ = entry.GetTransitionType();
31 navigation.has_post_data_ = entry.GetHasPostData(); 31 navigation.has_post_data_ = entry.GetHasPostData();
32 navigation.post_id_ = entry.GetPostID(); 32 navigation.post_id_ = entry.GetPostID();
33 navigation.original_request_url_ = entry.GetOriginalRequestURL(); 33 navigation.original_request_url_ = entry.GetOriginalRequestURL();
34 navigation.is_overriding_user_agent_ = entry.GetIsOverridingUserAgent(); 34 navigation.is_overriding_user_agent_ = entry.GetIsOverridingUserAgent();
35 navigation.timestamp_ = entry.GetTimestamp(); 35 navigation.timestamp_ = entry.GetTimestamp();
36 navigation.is_restored_ = entry.IsRestored(); 36 navigation.is_restored_ = entry.IsRestored();
37 // If you want to navigate a named frame in Chrome, you will first need to
38 // add support for persisting it. It is currently only used for layout tests.
39 CHECK(entry.GetFrameToNavigate().empty());
40 entry.GetExtraData(kSearchTermsKey, &navigation.search_terms_); 37 entry.GetExtraData(kSearchTermsKey, &navigation.search_terms_);
41 if (entry.GetFavicon().valid) 38 if (entry.GetFavicon().valid)
42 navigation.favicon_url_ = entry.GetFavicon().url; 39 navigation.favicon_url_ = entry.GetFavicon().url;
43 navigation.http_status_code_ = entry.GetHttpStatusCode(); 40 navigation.http_status_code_ = entry.GetHttpStatusCode();
44 navigation.redirect_chain_ = entry.GetRedirectChain(); 41 navigation.redirect_chain_ = entry.GetRedirectChain();
45 42
46 return navigation; 43 return navigation;
47 } 44 }
48 45
49 // static 46 // static
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 for (std::vector<SerializedNavigationEntry>::const_iterator 94 for (std::vector<SerializedNavigationEntry>::const_iterator
98 it = navigations.begin(); it != navigations.end(); ++it) { 95 it = navigations.begin(); it != navigations.end(); ++it) {
99 entries.push_back( 96 entries.push_back(
100 ToNavigationEntry(&(*it), page_id, browser_context).release()); 97 ToNavigationEntry(&(*it), page_id, browser_context).release());
101 ++page_id; 98 ++page_id;
102 } 99 }
103 return entries.Pass(); 100 return entries.Pass();
104 } 101 }
105 102
106 } // namespace sessions 103 } // namespace sessions
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.h » ('j') | content/browser/frame_host/frame_tree.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698