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(); | |
nasko
2014/10/13 15:55:24
This is the time we call Init. This is not the tim
carlosk
2014/10/13 18:01:46
It does not make a difference. I updated its gette
| |
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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
913 | 914 |
914 void RenderProcessHostImpl::NotifyTimezoneChange() { | 915 void RenderProcessHostImpl::NotifyTimezoneChange() { |
915 Send(new ViewMsg_TimezoneChange()); | 916 Send(new ViewMsg_TimezoneChange()); |
916 } | 917 } |
917 | 918 |
918 ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { | 919 ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { |
919 DCHECK(mojo_application_host_); | 920 DCHECK(mojo_application_host_); |
920 return mojo_application_host_->service_registry(); | 921 return mojo_application_host_->service_registry(); |
921 } | 922 } |
922 | 923 |
924 const base::TimeTicks& RenderProcessHostImpl::GetInitTime() const { | |
925 return init_time_; | |
926 } | |
927 | |
923 void RenderProcessHostImpl::AddRoute( | 928 void RenderProcessHostImpl::AddRoute( |
924 int32 routing_id, | 929 int32 routing_id, |
925 IPC::Listener* listener) { | 930 IPC::Listener* listener) { |
926 listeners_.AddWithID(listener, routing_id); | 931 listeners_.AddWithID(listener, routing_id); |
927 } | 932 } |
928 | 933 |
929 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { | 934 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { |
930 DCHECK(listeners_.Lookup(routing_id) != NULL); | 935 DCHECK(listeners_.Lookup(routing_id) != NULL); |
931 listeners_.Remove(routing_id); | 936 listeners_.Remove(routing_id); |
932 | 937 |
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2252 if (worker_ref_count_ == 0) | 2257 if (worker_ref_count_ == 0) |
2253 Cleanup(); | 2258 Cleanup(); |
2254 } | 2259 } |
2255 | 2260 |
2256 void RenderProcessHostImpl::EnsureMojoActivated() { | 2261 void RenderProcessHostImpl::EnsureMojoActivated() { |
2257 mojo_activation_required_ = true; | 2262 mojo_activation_required_ = true; |
2258 MaybeActivateMojo(); | 2263 MaybeActivateMojo(); |
2259 } | 2264 } |
2260 | 2265 |
2261 } // namespace content | 2266 } // namespace content |
OLD | NEW |