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

Unified Diff: chrome/browser/chromeos/status/status_area_view.h

Issue 8332016: Use Closure instead of ScopedRunnableFactory in StatusAreaView. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review feedback 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 | « no previous file | chrome/browser/chromeos/status/status_area_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/status/status_area_view.h
===================================================================
--- chrome/browser/chromeos/status/status_area_view.h (revision 106989)
+++ chrome/browser/chromeos/status/status_area_view.h (working copy)
@@ -8,7 +8,6 @@
#include "base/basictypes.h"
#include "base/callback.h"
-#include "base/task.h"
#include "chrome/browser/ui/views/accessible_pane_view.h"
#include "views/view.h"
@@ -25,7 +24,8 @@
// This class is used to wrap the small informative widgets in the upper-right
// of the window title bar. It is used on ChromeOS only.
-class StatusAreaView : public AccessiblePaneView {
+class StatusAreaView : public AccessiblePaneView,
+ public base::SupportsWeakPtr<StatusAreaView> {
public:
explicit StatusAreaView(StatusAreaHost* host);
virtual ~StatusAreaView();
@@ -37,8 +37,9 @@
// Takes focus and transfers it to the first (last if |reverse| is true).
// After focus has traversed through all elements, clears focus and calls
// |return_focus_cb(reverse)| from the message loop.
+ typedef base::Callback<void(bool)> ReturnFocusCallback;
void TakeFocus(bool reverse,
- const base::Callback<void(bool)>& return_focus_cb);
+ const ReturnFocusCallback& return_focus_cb);
// Overridden from views::FocusChangeListener:
virtual void FocusWillChange(views::View* focused_before,
@@ -69,8 +70,7 @@
// True if focus needs to be returned via |return_focus_cb_| when it wraps.
bool need_return_focus_;
- base::Callback<void(bool)> return_focus_cb_;
- ScopedRunnableMethodFactory<StatusAreaView> task_factory_;
+ ReturnFocusCallback return_focus_cb_;
// Clears focus and calls |return_focus_cb_|.
void ReturnFocus(bool reverse);
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/status_area_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698