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 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1449 } | 1449 } |
1450 | 1450 |
1451 bool RenderProcessHostImpl::SuddenTerminationAllowed() const { | 1451 bool RenderProcessHostImpl::SuddenTerminationAllowed() const { |
1452 return sudden_termination_allowed_; | 1452 return sudden_termination_allowed_; |
1453 } | 1453 } |
1454 | 1454 |
1455 base::TimeDelta RenderProcessHostImpl::GetChildProcessIdleTime() const { | 1455 base::TimeDelta RenderProcessHostImpl::GetChildProcessIdleTime() const { |
1456 return base::TimeTicks::Now() - child_process_activity_time_; | 1456 return base::TimeTicks::Now() - child_process_activity_time_; |
1457 } | 1457 } |
1458 | 1458 |
1459 void RenderProcessHostImpl::SurfaceUpdated(int32 surface_id) { | 1459 void RenderProcessHostImpl::OnParentGpuChannelEstablished() { |
1460 if (!gpu_message_filter_) | 1460 if (!gpu_message_filter_) |
1461 return; | 1461 return; |
1462 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind( | 1462 BrowserThread::PostTask( |
1463 &GpuMessageFilter::SurfaceUpdated, | 1463 BrowserThread::IO, |
1464 gpu_message_filter_, | 1464 FROM_HERE, |
1465 surface_id)); | 1465 base::Bind(&GpuMessageFilter::OnParentChannelEstablished, |
| 1466 gpu_message_filter_)); |
1466 } | 1467 } |
1467 | 1468 |
1468 void RenderProcessHostImpl::ResumeRequestsForView(int route_id) { | 1469 void RenderProcessHostImpl::ResumeRequestsForView(int route_id) { |
1469 widget_helper_->ResumeRequestsForView(route_id); | 1470 widget_helper_->ResumeRequestsForView(route_id); |
1470 } | 1471 } |
1471 | 1472 |
1472 IPC::ChannelProxy* RenderProcessHostImpl::GetChannel() { | 1473 IPC::ChannelProxy* RenderProcessHostImpl::GetChannel() { |
1473 return channel_.get(); | 1474 return channel_.get(); |
1474 } | 1475 } |
1475 | 1476 |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1897 // Skip widgets in other processes. | 1898 // Skip widgets in other processes. |
1898 if (widget->GetProcess()->GetID() != GetID()) | 1899 if (widget->GetProcess()->GetID() != GetID()) |
1899 continue; | 1900 continue; |
1900 | 1901 |
1901 RenderViewHost* rvh = RenderViewHost::From(widget); | 1902 RenderViewHost* rvh = RenderViewHost::From(widget); |
1902 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1903 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
1903 } | 1904 } |
1904 } | 1905 } |
1905 | 1906 |
1906 } // namespace content | 1907 } // namespace content |
OLD | NEW |