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

Unified Diff: chrome/browser/ui/views/first_run_bubble.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/first_run_bubble.h ('k') | chrome/browser/ui/views/notifications/balloon_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/first_run_bubble.cc
diff --git a/chrome/browser/ui/views/first_run_bubble.cc b/chrome/browser/ui/views/first_run_bubble.cc
index a9edfaaeaf08743873fb086508ebe60dcf56af88..349257a66e8f143a00a279ded5b6de2ad5e62db1 100644
--- a/chrome/browser/ui/views/first_run_bubble.cc
+++ b/chrome/browser/ui/views/first_run_bubble.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/views/first_run_bubble.h"
+#include "base/bind.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/search_engines/util.h"
@@ -522,7 +523,7 @@ FirstRunBubble::FirstRunBubble()
}
FirstRunBubble::~FirstRunBubble() {
- enable_window_method_factory_.RevokeAll();
+ enable_window_method_factory_.InvalidateWeakPtrs();
GetWidget()->GetFocusManager()->RemoveFocusChangeListener(view_);
}
@@ -556,9 +557,10 @@ void FirstRunBubble::OnActivate(UINT action, BOOL minimized, HWND window) {
::EnableWindow(GetParent(), false);
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- enable_window_method_factory_.NewRunnableMethod(
- &FirstRunBubble::EnableParent),
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&FirstRunBubble::EnableParent,
+ enable_window_method_factory_.GetWeakPtr()),
kLingerTime);
return;
}
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble.h ('k') | chrome/browser/ui/views/notifications/balloon_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698