| 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_widget_helper.h" | 5 #include "content/browser/renderer_host/render_widget_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/eintr_wrapper.h" | 9 #include "base/eintr_wrapper.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| 11 #include "content/browser/gpu/gpu_surface_tracker.h" | 11 #include "content/browser/gpu/gpu_surface_tracker.h" |
| 12 #include "content/browser/renderer_host/render_process_host_impl.h" | 12 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 13 #include "content/browser/renderer_host/render_view_host_impl.h" | 13 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 14 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 14 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 15 #include "content/common/view_messages.h" | 15 #include "content/common/view_messages.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 | 17 |
| 18 using content::BrowserThread; | 18 using content::BrowserThread; |
| 19 using content::RenderViewHostImpl; |
| 19 | 20 |
| 20 // A helper used with DidReceiveUpdateMsg that we hold a pointer to in | 21 // A helper used with DidReceiveUpdateMsg that we hold a pointer to in |
| 21 // pending_paints_. | 22 // pending_paints_. |
| 22 class RenderWidgetHelper::UpdateMsgProxy { | 23 class RenderWidgetHelper::UpdateMsgProxy { |
| 23 public: | 24 public: |
| 24 UpdateMsgProxy(RenderWidgetHelper* h, const IPC::Message& m); | 25 UpdateMsgProxy(RenderWidgetHelper* h, const IPC::Message& m); |
| 25 ~UpdateMsgProxy(); | 26 ~UpdateMsgProxy(); |
| 26 void Run(); | 27 void Run(); |
| 27 void Cancel() { cancelled_ = true; } | 28 void Cancel() { cancelled_ = true; } |
| 28 | 29 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 void RenderWidgetHelper::ClearAllocatedDIBs() { | 340 void RenderWidgetHelper::ClearAllocatedDIBs() { |
| 340 for (std::map<TransportDIB::Id, int>::iterator | 341 for (std::map<TransportDIB::Id, int>::iterator |
| 341 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) { | 342 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) { |
| 342 if (HANDLE_EINTR(close(i->second)) < 0) | 343 if (HANDLE_EINTR(close(i->second)) < 0) |
| 343 PLOG(ERROR) << "close: " << i->first; | 344 PLOG(ERROR) << "close: " << i->first; |
| 344 } | 345 } |
| 345 | 346 |
| 346 allocated_dibs_.clear(); | 347 allocated_dibs_.clear(); |
| 347 } | 348 } |
| 348 #endif | 349 #endif |
| OLD | NEW |