Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: content/browser/renderer_host/render_widget_helper.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/posix/eintr_wrapper.h" 10 #include "base/posix/eintr_wrapper.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 RenderWidgetHelper::BackingStoreMsgProxy::BackingStoreMsgProxy( 56 RenderWidgetHelper::BackingStoreMsgProxy::BackingStoreMsgProxy(
57 RenderWidgetHelper* h, const IPC::Message& m) 57 RenderWidgetHelper* h, const IPC::Message& m)
58 : helper_(h), 58 : helper_(h),
59 message_(m), 59 message_(m),
60 cancelled_(false) { 60 cancelled_(false) {
61 } 61 }
62 62
63 RenderWidgetHelper::BackingStoreMsgProxy::~BackingStoreMsgProxy() { 63 RenderWidgetHelper::BackingStoreMsgProxy::~BackingStoreMsgProxy() {
64 // If the paint message was never dispatched, then we need to let the 64 // If the paint message was never dispatched, then we need to let the
65 // helper know that we are going away. 65 // helper know that we are going away.
66 if (!cancelled_ && helper_) 66 if (!cancelled_ && helper_.get())
67 helper_->OnDiscardBackingStoreMsg(this); 67 helper_->OnDiscardBackingStoreMsg(this);
68 } 68 }
69 69
70 void RenderWidgetHelper::BackingStoreMsgProxy::Run() { 70 void RenderWidgetHelper::BackingStoreMsgProxy::Run() {
71 if (!cancelled_) { 71 if (!cancelled_) {
72 helper_->OnDispatchBackingStoreMsg(this); 72 helper_->OnDispatchBackingStoreMsg(this);
73 helper_ = NULL; 73 helper_ = NULL;
74 } 74 }
75 } 75 }
76 76
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) { 393 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) {
394 if (HANDLE_EINTR(close(i->second)) < 0) 394 if (HANDLE_EINTR(close(i->second)) < 0)
395 PLOG(ERROR) << "close: " << i->first; 395 PLOG(ERROR) << "close: " << i->first;
396 } 396 }
397 397
398 allocated_dibs_.clear(); 398 allocated_dibs_.clear();
399 } 399 }
400 #endif 400 #endif
401 401
402 } // namespace content 402 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698