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

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

Issue 225053004: Refactor views app list services to allow more code sharing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+sim30 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: chrome/browser/ui/views/app_list/win/activation_tracker_win.h
diff --git a/chrome/browser/ui/views/app_list/win/activation_tracker_win.h b/chrome/browser/ui/views/app_list/win/activation_tracker_win.h
index e3476241454b25aaab14934741118d8800993f6f..1fed8d466c16e517dee37ea28998a32aa4c91767 100644
--- a/chrome/browser/ui/views/app_list/win/activation_tracker_win.h
+++ b/chrome/browser/ui/views/app_list/win/activation_tracker_win.h
@@ -5,20 +5,16 @@
#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/basictypes.h"
-#include "base/callback.h"
+#include "base/macros.h"
#include "base/timer/timer.h"
#include "ui/app_list/views/app_list_view_observer.h"
-namespace app_list {
-class AppListView;
-}
+class AppListServiceWin;
// Periodically checks to see if an AppListView has lost focus using a timer.
class ActivationTrackerWin : public app_list::AppListViewObserver {
public:
- ActivationTrackerWin(app_list::AppListView* view,
- const base::Closure& on_should_dismiss);
+ explicit ActivationTrackerWin(AppListServiceWin* service);
~ActivationTrackerWin();
// app_list::AppListViewObserver:
@@ -37,11 +33,7 @@ class ActivationTrackerWin : public app_list::AppListViewObserver {
// app list).
bool ShouldDismissAppList();
- // The window to track the active state of.
- app_list::AppListView* view_;
-
- // Called to request |view_| be closed.
- base::Closure on_should_dismiss_;
+ AppListServiceWin* service_; // Weak. Owns this.
// 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

Powered by Google App Engine
This is Rietveld 408576698