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

Unified Diff: chrome/browser/ui/views/accessible_pane_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
Index: chrome/browser/ui/views/accessible_pane_view.cc
diff --git a/chrome/browser/ui/views/accessible_pane_view.cc b/chrome/browser/ui/views/accessible_pane_view.cc
index aa7b2d1a606c5e8910ea3c6d56d9687a0646c98f..0a3205b53535271a162c5e63fbef89fdc63d7dbf 100644
--- a/chrome/browser/ui/views/accessible_pane_view.cc
+++ b/chrome/browser/ui/views/accessible_pane_view.cc
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/browser/ui/views/accessible_pane_view.h"
+
+#include "base/bind.h"
#include "base/logging.h"
#include "chrome/browser/ui/view_ids.h"
-#include "chrome/browser/ui/views/accessible_pane_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "ui/base/accessibility/accessible_view_state.h"
@@ -217,8 +219,9 @@ void AccessiblePaneView::FocusWillChange(views::View* focused_before,
// Tabbing to the location bar should select all. Defer so that it happens
// after the focus.
MessageLoop::current()->PostTask(
- FROM_HERE, method_factory_.NewRunnableMethod(
- &AccessiblePaneView::LocationBarSelectAll));
+ FROM_HERE,
+ base::Bind(&AccessiblePaneView::LocationBarSelectAll,
+ method_factory_.GetWeakPtr()));
}
if (!Contains(focused_now) ||
@@ -232,8 +235,9 @@ void AccessiblePaneView::FocusWillChange(views::View* focused_before,
// remove |this| as a focus change listener while FocusManager is in the
// middle of iterating over the list of listeners.
MessageLoop::current()->PostTask(
- FROM_HERE, method_factory_.NewRunnableMethod(
- &AccessiblePaneView::RemovePaneFocus));
+ FROM_HERE,
+ base::Bind(&AccessiblePaneView::RemovePaneFocus,
+ method_factory_.GetWeakPtr()));
}
}
« no previous file with comments | « chrome/browser/ui/views/accessible_pane_view.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698