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

Unified Diff: chrome/browser/chromeos/notifications/balloon_view.cc

Issue 8381033: Replace ScopedRunnableMethodFactory with Closure in BalloonViewImpl. (Closed) Base URL: svn://chrome-svn/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/chromeos/notifications/balloon_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/notifications/balloon_view.cc
===================================================================
--- chrome/browser/chromeos/notifications/balloon_view.cc (revision 106989)
+++ chrome/browser/chromeos/notifications/balloon_view.cc (working copy)
@@ -4,8 +4,10 @@
#include "chrome/browser/chromeos/notifications/balloon_view.h"
+#include <algorithm>
#include <vector>
+#include "base/bind.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/chromeos/notifications/balloon_view_host.h"
@@ -19,7 +21,6 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
@@ -198,7 +199,6 @@
BalloonViewImpl::BalloonViewImpl(bool sticky, bool controls, bool web_ui)
: balloon_(NULL),
html_contents_(NULL),
- method_factory_(this),
stale_(false),
sticky_(sticky),
controls_(controls),
@@ -243,8 +243,7 @@
closed_ = true;
MessageLoop::current()->PostTask(
FROM_HERE,
- method_factory_.NewRunnableMethod(
- &BalloonViewImpl::DelayedClose, by_user));
+ base::Bind(&BalloonViewImpl::DelayedClose, AsWeakPtr(), by_user));
}
gfx::Size BalloonViewImpl::GetSize() const {
« no previous file with comments | « chrome/browser/chromeos/notifications/balloon_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698