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

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

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix network_service_loader Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/common/mojo/service_registry_impl.cc ('k') | device/serial/serial_connection.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // created due to a race between the message and a ViewMsg_New IPC that 282 // created due to a race between the message and a ViewMsg_New IPC that
283 // triggers creation of the RenderFrame we want. 283 // triggers creation of the RenderFrame we want.
284 if (!frame) { 284 if (!frame) {
285 RenderThreadImpl::current()->RegisterPendingRenderFrameConnect( 285 RenderThreadImpl::current()->RegisterPendingRenderFrameConnect(
286 frame_routing_id, request.PassMessagePipe()); 286 frame_routing_id, request.PassMessagePipe());
287 return; 287 return;
288 } 288 }
289 289
290 frame->BindServiceRegistry(request.PassMessagePipe()); 290 frame->BindServiceRegistry(request.PassMessagePipe());
291 } 291 }
292
293 virtual void OnConnectionError() OVERRIDE { delete this; }
294 }; 292 };
295 293
296 void CreateRenderFrameSetup(mojo::InterfaceRequest<RenderFrameSetup> request) { 294 void CreateRenderFrameSetup(mojo::InterfaceRequest<RenderFrameSetup> request) {
297 mojo::BindToRequest(new RenderFrameSetupImpl(), &request); 295 mojo::BindToRequest(new RenderFrameSetupImpl(), &request);
298 } 296 }
299 297
300 } // namespace 298 } // namespace
301 299
302 // For measuring memory usage after each task. Behind a command line flag. 300 // For measuring memory usage after each task. Behind a command line flag.
303 class MemoryObserver : public base::MessageLoop::TaskObserver { 301 class MemoryObserver : public base::MessageLoop::TaskObserver {
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 hidden_widget_count_--; 1620 hidden_widget_count_--;
1623 1621
1624 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1622 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1625 return; 1623 return;
1626 } 1624 }
1627 1625
1628 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1626 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1629 } 1627 }
1630 1628
1631 } // namespace content 1629 } // namespace content
OLDNEW
« no previous file with comments | « content/common/mojo/service_registry_impl.cc ('k') | device/serial/serial_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698