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

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

Issue 1489253002: Plumb document's strict mixed content checking for RemoteFrames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: alexmos nits Created 5 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 #include "content/browser/frame_host/frame_tree_node.h" 5 #include "content/browser/frame_host/frame_tree_node.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 render_manager_(this, 83 render_manager_(this,
84 render_frame_delegate, 84 render_frame_delegate,
85 render_view_delegate, 85 render_view_delegate,
86 render_widget_delegate, 86 render_widget_delegate,
87 manager_delegate), 87 manager_delegate),
88 frame_tree_node_id_(next_frame_tree_node_id_++), 88 frame_tree_node_id_(next_frame_tree_node_id_++),
89 parent_(NULL), 89 parent_(NULL),
90 opener_(nullptr), 90 opener_(nullptr),
91 opener_observer_(nullptr), 91 opener_observer_(nullptr),
92 has_committed_real_load_(false), 92 has_committed_real_load_(false),
93 replication_state_(scope, name, sandbox_flags), 93 replication_state_(
94 scope,
95 name,
96 sandbox_flags,
97 false /* should enforce strict mixed content checking */),
94 // Effective sandbox flags also need to be set, since initial sandbox 98 // Effective sandbox flags also need to be set, since initial sandbox
95 // flags should apply to the initial empty document in the frame. 99 // flags should apply to the initial empty document in the frame.
96 effective_sandbox_flags_(sandbox_flags), 100 effective_sandbox_flags_(sandbox_flags),
97 frame_owner_properties_(frame_owner_properties), 101 frame_owner_properties_(frame_owner_properties),
98 loading_progress_(kLoadingProgressNotStarted) { 102 loading_progress_(kLoadingProgressNotStarted) {
99 std::pair<FrameTreeNodeIDMap::iterator, bool> result = 103 std::pair<FrameTreeNodeIDMap::iterator, bool> result =
100 g_frame_tree_node_id_map.Get().insert( 104 g_frame_tree_node_id_map.Get().insert(
101 std::make_pair(frame_tree_node_id_, this)); 105 std::make_pair(frame_tree_node_id_, this));
102 CHECK(result.second); 106 CHECK(result.second);
103 } 107 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 render_manager_.OnDidUpdateOrigin(origin); 201 render_manager_.OnDidUpdateOrigin(origin);
198 replication_state_.origin = origin; 202 replication_state_.origin = origin;
199 } 203 }
200 204
201 void FrameTreeNode::SetFrameName(const std::string& name) { 205 void FrameTreeNode::SetFrameName(const std::string& name) {
202 if (name != replication_state_.name) 206 if (name != replication_state_.name)
203 render_manager_.OnDidUpdateName(name); 207 render_manager_.OnDidUpdateName(name);
204 replication_state_.name = name; 208 replication_state_.name = name;
205 } 209 }
206 210
211 void FrameTreeNode::SetShouldEnforceStrictMixedContentChecking(
212 bool should_enforce) {
213 if (should_enforce ==
214 replication_state_.should_enforce_strict_mixed_content_checking) {
215 return;
216 }
217 render_manager_.OnDidUpdateShouldEnforceStrictMixedContentChecking(
218 should_enforce);
219 replication_state_.should_enforce_strict_mixed_content_checking =
nasko 2015/12/17 17:16:32 Is there a specific reason why the update is done
estark 2015/12/17 22:19:10 Not that I know of. I was just following the examp
nasko 2015/12/18 18:27:12 Acknowledged.
220 should_enforce;
221 }
222
207 bool FrameTreeNode::IsDescendantOf(FrameTreeNode* other) const { 223 bool FrameTreeNode::IsDescendantOf(FrameTreeNode* other) const {
208 if (!other || !other->child_count()) 224 if (!other || !other->child_count())
209 return false; 225 return false;
210 226
211 for (FrameTreeNode* node = parent(); node; node = node->parent()) { 227 for (FrameTreeNode* node = parent(); node; node = node->parent()) {
212 if (node == other) 228 if (node == other)
213 return true; 229 return true;
214 } 230 }
215 231
216 return false; 232 return false;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 render_manager_.Stop(); 396 render_manager_.Stop();
381 return true; 397 return true;
382 } 398 }
383 399
384 void FrameTreeNode::DidFocus() { 400 void FrameTreeNode::DidFocus() {
385 last_focus_time_ = base::TimeTicks::Now(); 401 last_focus_time_ = base::TimeTicks::Now();
386 FOR_EACH_OBSERVER(Observer, observers_, OnFrameTreeNodeFocused(this)); 402 FOR_EACH_OBSERVER(Observer, observers_, OnFrameTreeNodeFocused(this));
387 } 403 }
388 404
389 } // namespace content 405 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698