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

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

Issue 518583003: Don't take a fake UGI every time we execute Javascript. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix styling Created 6 years, 3 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 const base::string16& javascript, 262 const base::string16& javascript,
263 const JavaScriptResultCallback& callback) { 263 const JavaScriptResultCallback& callback) {
264 static int next_id = 1; 264 static int next_id = 1;
265 int key = next_id++; 265 int key = next_id++;
266 Send(new FrameMsg_JavaScriptExecuteRequest(routing_id_, 266 Send(new FrameMsg_JavaScriptExecuteRequest(routing_id_,
267 javascript, 267 javascript,
268 key, true)); 268 key, true));
269 javascript_callbacks_.insert(std::make_pair(key, callback)); 269 javascript_callbacks_.insert(std::make_pair(key, callback));
270 } 270 }
271 271
272 void RenderFrameHostImpl::ExecuteJavaScriptForTests(
273 const base::string16& javascript) {
274 Send(new FrameMsg_JavaScriptExecuteRequestForTests(routing_id_,
275 javascript,
276 0, false));
277 }
278
272 RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() { 279 RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() {
273 return render_view_host_; 280 return render_view_host_;
274 } 281 }
275 282
276 ServiceRegistry* RenderFrameHostImpl::GetServiceRegistry() { 283 ServiceRegistry* RenderFrameHostImpl::GetServiceRegistry() {
277 static_cast<RenderProcessHostImpl*>(GetProcess())->EnsureMojoActivated(); 284 static_cast<RenderProcessHostImpl*>(GetProcess())->EnsureMojoActivated();
278 return &service_registry_; 285 return &service_registry_;
279 } 286 }
280 287
281 bool RenderFrameHostImpl::Send(IPC::Message* message) { 288 bool RenderFrameHostImpl::Send(IPC::Message* message) {
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 // Clear any state if a pending navigation is canceled or preempted. 1332 // Clear any state if a pending navigation is canceled or preempted.
1326 if (suspended_nav_params_) 1333 if (suspended_nav_params_)
1327 suspended_nav_params_.reset(); 1334 suspended_nav_params_.reset();
1328 1335
1329 TRACE_EVENT_ASYNC_END0("navigation", 1336 TRACE_EVENT_ASYNC_END0("navigation",
1330 "RenderFrameHostImpl navigation suspended", this); 1337 "RenderFrameHostImpl navigation suspended", this);
1331 navigations_suspended_ = false; 1338 navigations_suspended_ = false;
1332 } 1339 }
1333 1340
1334 } // namespace content 1341 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698