| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |