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

Unified Diff: trunk/src/chrome/browser/ui/views/app_list/win/activation_tracker_win.h

Issue 266643005: Revert 267354 "Refactor views app list services to allow more co..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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: trunk/src/chrome/browser/ui/views/app_list/win/activation_tracker_win.h
===================================================================
--- trunk/src/chrome/browser/ui/views/app_list/win/activation_tracker_win.h (revision 267382)
+++ trunk/src/chrome/browser/ui/views/app_list/win/activation_tracker_win.h (working copy)
@@ -5,16 +5,20 @@
#ifndef CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_ACTIVATION_TRACKER_WIN_H_
#define CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_ACTIVATION_TRACKER_WIN_H_
-#include "base/macros.h"
+#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/timer/timer.h"
#include "ui/app_list/views/app_list_view_observer.h"
-class AppListServiceWin;
+namespace app_list {
+class AppListView;
+}
// Periodically checks to see if an AppListView has lost focus using a timer.
class ActivationTrackerWin : public app_list::AppListViewObserver {
public:
- explicit ActivationTrackerWin(AppListServiceWin* service);
+ ActivationTrackerWin(app_list::AppListView* view,
+ const base::Closure& on_should_dismiss);
~ActivationTrackerWin();
// app_list::AppListViewObserver:
@@ -33,8 +37,12 @@
// app list).
bool ShouldDismissAppList();
- AppListServiceWin* service_; // Weak. Owns this.
+ // The window to track the active state of.
+ app_list::AppListView* view_;
+ // Called to request |view_| be closed.
+ base::Closure on_should_dismiss_;
+
// Records whether, on the previous timer tick, the taskbar had focus without
// the right mouse button being down. We allow the taskbar to have focus for
// one tick before dismissing the app list. This allows the app list to be

Powered by Google App Engine
This is Rietveld 408576698