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

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

Issue 358973005: Navigation transitions: Pass is_transition_navigation flag up to the embedder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/browser/site_instance_impl.h" 10 #include "content/browser/site_instance_impl.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 virtual void SetExtraData(const std::string& key, 82 virtual void SetExtraData(const std::string& key,
83 const base::string16& data) OVERRIDE; 83 const base::string16& data) OVERRIDE;
84 virtual bool GetExtraData(const std::string& key, 84 virtual bool GetExtraData(const std::string& key,
85 base::string16* data) const OVERRIDE; 85 base::string16* data) const OVERRIDE;
86 virtual void ClearExtraData(const std::string& key) OVERRIDE; 86 virtual void ClearExtraData(const std::string& key) OVERRIDE;
87 virtual void SetHttpStatusCode(int http_status_code) OVERRIDE; 87 virtual void SetHttpStatusCode(int http_status_code) OVERRIDE;
88 virtual int GetHttpStatusCode() const OVERRIDE; 88 virtual int GetHttpStatusCode() const OVERRIDE;
89 virtual void SetRedirectChain(const std::vector<GURL>& redirects) OVERRIDE; 89 virtual void SetRedirectChain(const std::vector<GURL>& redirects) OVERRIDE;
90 virtual const std::vector<GURL>& GetRedirectChain() const OVERRIDE; 90 virtual const std::vector<GURL>& GetRedirectChain() const OVERRIDE;
91 virtual bool IsRestored() const OVERRIDE; 91 virtual bool IsRestored() const OVERRIDE;
92 virtual void SetIsTransitionNavigation(bool is_transition_navigation)
nasko 2014/07/03 09:39:30 Does this mean that both forward and backwards nav
oystein (OOO til 10th of July) 2014/07/17 17:52:49 Hm, ideally not. The reason for this flag being in
93 OVERRIDE;
94 virtual bool IsTransitionNavigation() OVERRIDE;
92 95
93 // Once a navigation entry is committed, we should no longer track several 96 // Once a navigation entry is committed, we should no longer track several
94 // pieces of non-persisted state, as documented on the members below. 97 // pieces of non-persisted state, as documented on the members below.
95 void ResetForCommit(); 98 void ResetForCommit();
96 99
97 void set_unique_id(int unique_id) { 100 void set_unique_id(int unique_id) {
98 unique_id_ = unique_id; 101 unique_id_ = unique_id;
99 } 102 }
100 103
101 // The SiteInstance tells us how to share sub-processes. This is a reference 104 // The SiteInstance tells us how to share sub-processes. This is a reference
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 214
212 // Indicates which FrameTreeNode to navigate. Currently only used if the 215 // Indicates which FrameTreeNode to navigate. Currently only used if the
213 // --site-per-process flag is passed. 216 // --site-per-process flag is passed.
214 int64 frame_tree_node_id() const { 217 int64 frame_tree_node_id() const {
215 return frame_tree_node_id_; 218 return frame_tree_node_id_;
216 } 219 }
217 void set_frame_tree_node_id(int64 frame_tree_node_id) { 220 void set_frame_tree_node_id(int64 frame_tree_node_id) {
218 frame_tree_node_id_ = frame_tree_node_id; 221 frame_tree_node_id_ = frame_tree_node_id;
219 } 222 }
220 223
224 bool is_transition_navigation() const {
225 return is_transition_navigation_;
226 }
227
221 private: 228 private:
222 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 229 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
223 // Session/Tab restore save portions of this class so that it can be recreated 230 // Session/Tab restore save portions of this class so that it can be recreated
224 // later. If you add a new field that needs to be persisted you'll have to 231 // later. If you add a new field that needs to be persisted you'll have to
225 // update SessionService/TabRestoreService and Android WebView 232 // update SessionService/TabRestoreService and Android WebView
226 // state_serializer.cc appropriately. 233 // state_serializer.cc appropriately.
227 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 234 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
228 235
229 // See the accessors above for descriptions. 236 // See the accessors above for descriptions.
230 int unique_id_; 237 int unique_id_;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 // --site-per-process flag is passed. It is cleared in |ResetForCommit| 338 // --site-per-process flag is passed. It is cleared in |ResetForCommit|
332 // because we only use it while the navigation is pending. 339 // because we only use it while the navigation is pending.
333 // TODO(creis): Move this to FrameNavigationEntry. 340 // TODO(creis): Move this to FrameNavigationEntry.
334 int64 frame_tree_node_id_; 341 int64 frame_tree_node_id_;
335 342
336 // Used to store extra data to support browser features. This member is not 343 // Used to store extra data to support browser features. This member is not
337 // persisted, unless specific data is taken out/put back in at save/restore 344 // persisted, unless specific data is taken out/put back in at save/restore
338 // time (see TabNavigation for an example of this). 345 // time (see TabNavigation for an example of this).
339 std::map<std::string, base::string16> extra_data_; 346 std::map<std::string, base::string16> extra_data_;
340 347
348 bool is_transition_navigation_;
nasko 2014/07/03 09:39:30 Just like other places, this needs a comment.
349
341 // Copy and assignment is explicitly allowed for this class. 350 // Copy and assignment is explicitly allowed for this class.
342 }; 351 };
343 352
344 } // namespace content 353 } // namespace content
345 354
346 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ 355 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698