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

Side by Side Diff: content/renderer/render_frame_proxy.cc

Issue 1208143002: Move existing kSitePerProcess checks to a policy-oracle object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@swapped_out_cmdline_checks
Patch Set: Attempt to fix compile. Created 5 years, 4 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 "content/renderer/render_frame_proxy.h" 5 #include "content/renderer/render_frame_proxy.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "content/child/webmessageportchannel_impl.h" 11 #include "content/child/webmessageportchannel_impl.h"
12 #include "content/common/frame_messages.h" 12 #include "content/common/frame_messages.h"
13 #include "content/common/frame_replication_state.h" 13 #include "content/common/frame_replication_state.h"
14 #include "content/common/site_isolation_policy.h"
14 #include "content/common/swapped_out_messages.h" 15 #include "content/common/swapped_out_messages.h"
15 #include "content/common/view_messages.h" 16 #include "content/common/view_messages.h"
16 #include "content/public/common/content_switches.h"
17 #include "content/renderer/child_frame_compositing_helper.h" 17 #include "content/renderer/child_frame_compositing_helper.h"
18 #include "content/renderer/render_frame_impl.h" 18 #include "content/renderer/render_frame_impl.h"
19 #include "content/renderer/render_thread_impl.h" 19 #include "content/renderer/render_thread_impl.h"
20 #include "content/renderer/render_view_impl.h" 20 #include "content/renderer/render_view_impl.h"
21 #include "third_party/WebKit/public/platform/WebString.h" 21 #include "third_party/WebKit/public/platform/WebString.h"
22 #include "third_party/WebKit/public/web/WebLocalFrame.h" 22 #include "third_party/WebKit/public/web/WebLocalFrame.h"
23 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" 23 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
24 #include "third_party/WebKit/public/web/WebView.h" 24 #include "third_party/WebKit/public/web/WebView.h"
25 25
26 namespace content { 26 namespace content {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 if (iter != g_frame_map.Get().end()) { 112 if (iter != g_frame_map.Get().end()) {
113 RenderFrameProxy* proxy = iter->second; 113 RenderFrameProxy* proxy = iter->second;
114 DCHECK_EQ(web_frame, proxy->web_frame()); 114 DCHECK_EQ(web_frame, proxy->web_frame());
115 return proxy; 115 return proxy;
116 } 116 }
117 return NULL; 117 return NULL;
118 } 118 }
119 119
120 // static 120 // static
121 bool RenderFrameProxy::IsSwappedOutStateForbidden() { 121 bool RenderFrameProxy::IsSwappedOutStateForbidden() {
122 return base::CommandLine::ForCurrentProcess()->HasSwitch( 122 return SiteIsolationPolicy::AreCrossProcessFramesPossible();
123 switches::kSitePerProcess);
124 } 123 }
125 124
126 RenderFrameProxy::RenderFrameProxy(int routing_id, int frame_routing_id) 125 RenderFrameProxy::RenderFrameProxy(int routing_id, int frame_routing_id)
127 : routing_id_(routing_id), 126 : routing_id_(routing_id),
128 frame_routing_id_(frame_routing_id), 127 frame_routing_id_(frame_routing_id),
129 web_frame_(NULL), 128 web_frame_(NULL),
130 render_view_(NULL) { 129 render_view_(NULL) {
131 std::pair<RoutingIDProxyMap::iterator, bool> result = 130 std::pair<RoutingIDProxyMap::iterator, bool> result =
132 g_routing_id_proxy_map.Get().insert(std::make_pair(routing_id_, this)); 131 g_routing_id_proxy_map.Get().insert(std::make_pair(routing_id_, this));
133 CHECK(result.second) << "Inserting a duplicate item."; 132 CHECK(result.second) << "Inserting a duplicate item.";
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 blink::WebUserGestureIndicator::isProcessingUserGesture(); 413 blink::WebUserGestureIndicator::isProcessingUserGesture();
415 blink::WebUserGestureIndicator::consumeUserGesture(); 414 blink::WebUserGestureIndicator::consumeUserGesture();
416 Send(new FrameHostMsg_OpenURL(routing_id_, params)); 415 Send(new FrameHostMsg_OpenURL(routing_id_, params));
417 } 416 }
418 417
419 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) { 418 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) {
420 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); 419 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event));
421 } 420 }
422 421
423 } // namespace 422 } // namespace
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl_browsertest.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698