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

Unified Diff: chrome/browser/ui/views/notifications/balloon_view.cc

Issue 8301022: ui/views: Migrate usages of ScopedRunnableMethodFactory to base::WeakPtrFactory/base::Bind pair. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/notifications/balloon_view.h ('k') | chrome/browser/ui/views/status_bubble_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/notifications/balloon_view.cc
diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc
index bf1376bce5faa830e9104cfe5ade6f5ef75f0414..81939843fb0b3aa413a7418076537c91c7143c03 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include <vector>
+#include "base/bind.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/notifications/balloon.h"
@@ -116,8 +117,9 @@ BalloonViewImpl::~BalloonViewImpl() {
void BalloonViewImpl::Close(bool by_user) {
MessageLoop::current()->PostTask(FROM_HERE,
- method_factory_.NewRunnableMethod(
- &BalloonViewImpl::DelayedClose, by_user));
+ base::Bind(&BalloonViewImpl::DelayedClose,
+ method_factory_.GetWeakPtr(),
+ by_user));
}
gfx::Size BalloonViewImpl::GetSize() const {
« no previous file with comments | « chrome/browser/ui/views/notifications/balloon_view.h ('k') | chrome/browser/ui/views/status_bubble_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698