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

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

Issue 592153002: Replace Chrome IPC with Mojo IPC for querying BatteryStatus service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Tim's comments. Created 6 years, 2 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 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 Send(new FrameMsg_JavaScriptExecuteRequestForTests(routing_id_, 280 Send(new FrameMsg_JavaScriptExecuteRequestForTests(routing_id_,
281 javascript, 281 javascript,
282 0, false)); 282 0, false));
283 } 283 }
284 284
285 RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() { 285 RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() {
286 return render_view_host_; 286 return render_view_host_;
287 } 287 }
288 288
289 ServiceRegistry* RenderFrameHostImpl::GetServiceRegistry() { 289 ServiceRegistry* RenderFrameHostImpl::GetServiceRegistry() {
290 static_cast<RenderProcessHostImpl*>(GetProcess())->EnsureMojoActivated();
291 return &service_registry_; 290 return &service_registry_;
292 } 291 }
293 292
294 bool RenderFrameHostImpl::Send(IPC::Message* message) { 293 bool RenderFrameHostImpl::Send(IPC::Message* message) {
295 if (IPC_MESSAGE_ID_CLASS(message->type()) == InputMsgStart) { 294 if (IPC_MESSAGE_ID_CLASS(message->type()) == InputMsgStart) {
296 return render_view_host_->input_router()->SendInput( 295 return render_view_host_->input_router()->SendInput(
297 make_scoped_ptr(message)); 296 make_scoped_ptr(message));
298 } 297 }
299 298
300 // Route IPCs through the RenderFrameProxyHost when in swapped out state. 299 // Route IPCs through the RenderFrameProxyHost when in swapped out state.
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 // Clear any state if a pending navigation is canceled or preempted. 1463 // Clear any state if a pending navigation is canceled or preempted.
1465 if (suspended_nav_params_) 1464 if (suspended_nav_params_)
1466 suspended_nav_params_.reset(); 1465 suspended_nav_params_.reset();
1467 1466
1468 TRACE_EVENT_ASYNC_END0("navigation", 1467 TRACE_EVENT_ASYNC_END0("navigation",
1469 "RenderFrameHostImpl navigation suspended", this); 1468 "RenderFrameHostImpl navigation suspended", this);
1470 navigations_suspended_ = false; 1469 navigations_suspended_ = false;
1471 } 1470 }
1472 1471
1473 } // namespace content 1472 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698