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

Side by Side Diff: chrome/browser/ui/app_list/app_list_view_delegate.h

Issue 11094019: Auto hide app list on Windows when it loses focus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/ui/app_list/app_list_controller.h" 13 #include "chrome/browser/ui/app_list/app_list_controller.h"
14 #include "ui/app_list/app_list_view_delegate.h" 14 #include "ui/app_list/app_list_view_delegate.h"
15 15
16 class AppsModelBuilder; 16 class AppsModelBuilder;
17 class SearchBuilder; 17 class SearchBuilder;
18 18
19 class AppListViewDelegate : public app_list::AppListViewDelegate { 19 class AppListViewDelegate : public app_list::AppListViewDelegate {
20 public: 20 public:
21 // The delegate will take ownership of the controller. 21 // The delegate will take ownership of the controller.
22 explicit AppListViewDelegate(AppListController* controller); 22 explicit AppListViewDelegate(AppListControllerDelegate* controller);
23 virtual ~AppListViewDelegate(); 23 virtual ~AppListViewDelegate();
24 24
25 private: 25 private:
26 // Overridden from app_list::AppListViewDelegate: 26 // Overridden from app_list::AppListViewDelegate:
27 virtual void SetModel(app_list::AppListModel* model) OVERRIDE; 27 virtual void SetModel(app_list::AppListModel* model) OVERRIDE;
28 virtual void ActivateAppListItem(app_list::AppListItemModel* item, 28 virtual void ActivateAppListItem(app_list::AppListItemModel* item,
29 int event_flags) OVERRIDE; 29 int event_flags) OVERRIDE;
30 virtual void StartSearch() OVERRIDE; 30 virtual void StartSearch() OVERRIDE;
31 virtual void StopSearch() OVERRIDE; 31 virtual void StopSearch() OVERRIDE;
32 virtual void OpenSearchResult(const app_list::SearchResult& result, 32 virtual void OpenSearchResult(const app_list::SearchResult& result,
33 int event_flags) OVERRIDE; 33 int event_flags) OVERRIDE;
34 virtual void InvokeSearchResultAction(const app_list::SearchResult& result, 34 virtual void InvokeSearchResultAction(const app_list::SearchResult& result,
35 int action_index, 35 int action_index,
36 int event_flags) OVERRIDE; 36 int event_flags) OVERRIDE;
37 virtual void Close() OVERRIDE; 37 virtual void Close() OVERRIDE;
38 virtual void ViewClosing() OVERRIDE;
39 virtual void ViewActivationChanged(bool active) OVERRIDE;
38 40
39 scoped_ptr<AppsModelBuilder> apps_builder_; 41 scoped_ptr<AppsModelBuilder> apps_builder_;
40 scoped_ptr<SearchBuilder> search_builder_; 42 scoped_ptr<SearchBuilder> search_builder_;
41 scoped_ptr<AppListController> controller_; 43 scoped_ptr<AppListControllerDelegate> controller_;
42 44
43 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); 45 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
44 }; 46 };
45 47
46 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 48 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698