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/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 if (ResourceDispatcherHostImpl::Get()) { | 227 if (ResourceDispatcherHostImpl::Get()) { |
228 BrowserThread::PostTask( | 228 BrowserThread::PostTask( |
229 BrowserThread::IO, FROM_HERE, | 229 BrowserThread::IO, FROM_HERE, |
230 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostCreated, | 230 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostCreated, |
231 base::Unretained(ResourceDispatcherHostImpl::Get()), | 231 base::Unretained(ResourceDispatcherHostImpl::Get()), |
232 GetProcess()->GetID(), GetRoutingID())); | 232 GetProcess()->GetID(), GetRoutingID())); |
233 } | 233 } |
234 | 234 |
235 close_timeout_.reset(new TimeoutMonitor(base::Bind( | 235 close_timeout_.reset(new TimeoutMonitor(base::Bind( |
236 &RenderViewHostImpl::ClosePageTimeout, weak_factory_.GetWeakPtr()))); | 236 &RenderViewHostImpl::ClosePageTimeout, weak_factory_.GetWeakPtr()))); |
| 237 |
| 238 input_device_change_observer_.reset(new InputDeviceChangeObserver(this)); |
237 } | 239 } |
238 | 240 |
239 RenderViewHostImpl::~RenderViewHostImpl() { | 241 RenderViewHostImpl::~RenderViewHostImpl() { |
240 if (ResourceDispatcherHostImpl::Get()) { | 242 if (ResourceDispatcherHostImpl::Get()) { |
241 BrowserThread::PostTask( | 243 BrowserThread::PostTask( |
242 BrowserThread::IO, FROM_HERE, | 244 BrowserThread::IO, FROM_HERE, |
243 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostDeleted, | 245 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostDeleted, |
244 base::Unretained(ResourceDispatcherHostImpl::Get()), | 246 base::Unretained(ResourceDispatcherHostImpl::Get()), |
245 GetProcess()->GetID(), GetRoutingID())); | 247 GetProcess()->GetID(), GetRoutingID())); |
246 } | 248 } |
247 | |
248 delegate_->RenderViewDeleted(this); | 249 delegate_->RenderViewDeleted(this); |
249 GetProcess()->RemoveObserver(this); | 250 GetProcess()->RemoveObserver(this); |
250 } | 251 } |
251 | 252 |
252 RenderViewHostDelegate* RenderViewHostImpl::GetDelegate() const { | 253 RenderViewHostDelegate* RenderViewHostImpl::GetDelegate() const { |
253 return delegate_; | 254 return delegate_; |
254 } | 255 } |
255 | 256 |
256 SiteInstanceImpl* RenderViewHostImpl::GetSiteInstance() const { | 257 SiteInstanceImpl* RenderViewHostImpl::GetSiteInstance() const { |
257 return instance_.get(); | 258 return instance_.get(); |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 } | 962 } |
962 | 963 |
963 void RenderViewHostImpl::ClosePageTimeout() { | 964 void RenderViewHostImpl::ClosePageTimeout() { |
964 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) | 965 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) |
965 return; | 966 return; |
966 | 967 |
967 ClosePageIgnoringUnloadEvents(); | 968 ClosePageIgnoringUnloadEvents(); |
968 } | 969 } |
969 | 970 |
970 } // namespace content | 971 } // namespace content |
OLD | NEW |