OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_FRAME_NAVIGATION_ENTRY_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const Referrer& referrer, | 48 const Referrer& referrer, |
49 const PageState& page_state); | 49 const PageState& page_state); |
50 | 50 |
51 // The ID of the FrameTreeNode this entry is for. -1 for the main frame, | 51 // The ID of the FrameTreeNode this entry is for. -1 for the main frame, |
52 // since we don't always know the FrameTreeNode ID when creating the overall | 52 // since we don't always know the FrameTreeNode ID when creating the overall |
53 // NavigationEntry. | 53 // NavigationEntry. |
54 // TODO(creis): Consider removing |frame_tree_node_id| in favor of | 54 // TODO(creis): Consider removing |frame_tree_node_id| in favor of |
55 // |frame_unique_name|, if we can move unique name computation to the browser | 55 // |frame_unique_name|, if we can move unique name computation to the browser |
56 // process. | 56 // process. |
57 int frame_tree_node_id() const { return frame_tree_node_id_; } | 57 int frame_tree_node_id() const { return frame_tree_node_id_; } |
| 58 void set_frame_tree_node_id(int frame_tree_node_id) { |
| 59 frame_tree_node_id_ = frame_tree_node_id; |
| 60 } |
58 | 61 |
59 // The unique name of the frame this entry is for. This is a stable name for | 62 // The unique name of the frame this entry is for. This is a stable name for |
60 // the frame based on its position in the tree and relation to other named | 63 // the frame based on its position in the tree and relation to other named |
61 // frames, which does not change after cross-process navigations or restores. | 64 // frames, which does not change after cross-process navigations or restores. |
62 // Only the main frame can have an empty name. | 65 // Only the main frame can have an empty name. |
63 // | 66 // |
64 // This is unique relative to other frames in the same page, but not among | 67 // This is unique relative to other frames in the same page, but not among |
65 // other pages (i.e., not globally unique). | 68 // other pages (i.e., not globally unique). |
66 const std::string& frame_unique_name() const { return frame_unique_name_; } | 69 const std::string& frame_unique_name() const { return frame_unique_name_; } |
67 void set_frame_unique_name(const std::string& frame_unique_name) { | 70 void set_frame_unique_name(const std::string& frame_unique_name) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 Referrer referrer_; | 123 Referrer referrer_; |
121 // TODO(creis): Change this to FrameState. | 124 // TODO(creis): Change this to FrameState. |
122 PageState page_state_; | 125 PageState page_state_; |
123 | 126 |
124 DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry); | 127 DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry); |
125 }; | 128 }; |
126 | 129 |
127 } // namespace content | 130 } // namespace content |
128 | 131 |
129 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ | 132 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ |
OLD | NEW |