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

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

Issue 692973005: Pass origin information for remote frame creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failures for content:// URLs on Android Created 6 years 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 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_FRAME_TREE_NODE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
14 #include "content/browser/frame_host/render_frame_host_impl.h" 14 #include "content/browser/frame_host/render_frame_host_impl.h"
15 #include "content/browser/frame_host/render_frame_host_manager.h" 15 #include "content/browser/frame_host/render_frame_host_manager.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/common/frame_replication_state.h"
17 #include "url/gurl.h" 18 #include "url/gurl.h"
19 #include "url/origin.h"
18 20
19 namespace content { 21 namespace content {
20 22
21 class FrameTree; 23 class FrameTree;
22 class Navigator; 24 class Navigator;
23 class RenderFrameHostImpl; 25 class RenderFrameHostImpl;
24 26
25 // When a page contains iframes, its renderer process maintains a tree structure 27 // When a page contains iframes, its renderer process maintains a tree structure
26 // of those frames. We are mirroring this tree in the browser process. This 28 // of those frames. We are mirroring this tree in the browser process. This
27 // class represents a node in this tree and is a wrapper for all objects that 29 // class represents a node in this tree and is a wrapper for all objects that
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 82 }
81 83
82 const GURL& current_url() const { 84 const GURL& current_url() const {
83 return current_url_; 85 return current_url_;
84 } 86 }
85 87
86 void set_current_url(const GURL& url) { 88 void set_current_url(const GURL& url) {
87 current_url_ = url; 89 current_url_ = url;
88 } 90 }
89 91
92 void set_current_origin(const url::Origin& origin) {
93 replication_state_.origin = origin;
94 }
95
96 const FrameReplicationState& current_replication_state() const {
97 return replication_state_;
98 }
99
90 RenderFrameHostImpl* current_frame_host() const { 100 RenderFrameHostImpl* current_frame_host() const {
91 return render_manager_.current_frame_host(); 101 return render_manager_.current_frame_host();
92 } 102 }
93 103
94 private: 104 private:
95 void set_parent(FrameTreeNode* parent) { parent_ = parent; } 105 void set_parent(FrameTreeNode* parent) { parent_ = parent; }
96 106
97 // The next available browser-global FrameTreeNode ID. 107 // The next available browser-global FrameTreeNode ID.
98 static int64 next_frame_tree_node_id_; 108 static int64 next_frame_tree_node_id_;
99 109
(...skipping 24 matching lines...) Expand all
124 134
125 // The immediate children of this specific frame. 135 // The immediate children of this specific frame.
126 ScopedVector<FrameTreeNode> children_; 136 ScopedVector<FrameTreeNode> children_;
127 137
128 // Track the current frame's last committed URL, so we can estimate the 138 // Track the current frame's last committed URL, so we can estimate the
129 // process impact of out-of-process iframes. 139 // process impact of out-of-process iframes.
130 // TODO(creis): Remove this when we can store subframe URLs in the 140 // TODO(creis): Remove this when we can store subframe URLs in the
131 // NavigationController. 141 // NavigationController.
132 GURL current_url_; 142 GURL current_url_;
133 143
144 // Track information that needs to be replicated to processes that have
145 // proxies for this frame.
146 FrameReplicationState replication_state_;
147
134 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); 148 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode);
135 }; 149 };
136 150
137 } // namespace content 151 } // namespace content
138 152
139 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 153 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_browsertest.cc ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698