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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 } | 636 } |
637 | 637 |
638 if (!gpu_observer_registered_) { | 638 if (!gpu_observer_registered_) { |
639 gpu_observer_registered_ = true; | 639 gpu_observer_registered_ = true; |
640 GpuDataManagerImpl::GetInstance()->AddObserver(this); | 640 GpuDataManagerImpl::GetInstance()->AddObserver(this); |
641 } | 641 } |
642 | 642 |
643 power_monitor_broadcaster_.Init(); | 643 power_monitor_broadcaster_.Init(); |
644 | 644 |
645 is_initialized_ = true; | 645 is_initialized_ = true; |
| 646 init_time_ = base::TimeTicks::Now(); |
646 return true; | 647 return true; |
647 } | 648 } |
648 | 649 |
649 void RenderProcessHostImpl::MaybeActivateMojo() { | 650 void RenderProcessHostImpl::MaybeActivateMojo() { |
650 // TODO(darin): Following security review, we can unconditionally initialize | 651 // TODO(darin): Following security review, we can unconditionally initialize |
651 // Mojo in all renderers. We will then be able to directly call Activate() | 652 // Mojo in all renderers. We will then be able to directly call Activate() |
652 // from OnProcessLaunched. | 653 // from OnProcessLaunched. |
653 if (!mojo_activation_required_) | 654 if (!mojo_activation_required_) |
654 return; // Waiting on someone to require Mojo. | 655 return; // Waiting on someone to require Mojo. |
655 | 656 |
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2252 if (worker_ref_count_ == 0) | 2253 if (worker_ref_count_ == 0) |
2253 Cleanup(); | 2254 Cleanup(); |
2254 } | 2255 } |
2255 | 2256 |
2256 void RenderProcessHostImpl::EnsureMojoActivated() { | 2257 void RenderProcessHostImpl::EnsureMojoActivated() { |
2257 mojo_activation_required_ = true; | 2258 mojo_activation_required_ = true; |
2258 MaybeActivateMojo(); | 2259 MaybeActivateMojo(); |
2259 } | 2260 } |
2260 | 2261 |
2261 } // namespace content | 2262 } // namespace content |
OLD | NEW |