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

Side by Side Diff: chrome/browser/ui/ash/app_list/app_list_service_ash.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_
6 #define CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_ 6 #define CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/app_list/app_list_service_impl.h" 9 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
10 #include "ui/app_list/app_list_model.h" 10 #include "ui/app_list/app_list_model.h"
11 11
12 class AppListControllerDelegateAsh; 12 class AppListControllerDelegateAsh;
13
14 namespace base {
13 template <typename T> struct DefaultSingletonTraits; 15 template <typename T> struct DefaultSingletonTraits;
16 }
14 17
15 // AppListServiceAsh wraps functionality in ChromeLauncherController and the Ash 18 // AppListServiceAsh wraps functionality in ChromeLauncherController and the Ash
16 // Shell for showing and hiding the app list on the Ash desktop. 19 // Shell for showing and hiding the app list on the Ash desktop.
17 class AppListServiceAsh : public AppListServiceImpl { 20 class AppListServiceAsh : public AppListServiceImpl {
18 public: 21 public:
19 static AppListServiceAsh* GetInstance(); 22 static AppListServiceAsh* GetInstance();
20 23
21 // AppListService overrides: 24 // AppListService overrides:
22 void Init(Profile* initial_profile) override; 25 void Init(Profile* initial_profile) override;
23 26
24 // ProfileInfoCacheObserver overrides: 27 // ProfileInfoCacheObserver overrides:
25 // On ChromeOS this should never happen. On other platforms, there is always a 28 // On ChromeOS this should never happen. On other platforms, there is always a
26 // Non-ash AppListService that is responsible for handling this. 29 // Non-ash AppListService that is responsible for handling this.
27 // TODO(calamity): Ash shouldn't observe the ProfileInfoCache at all. 30 // TODO(calamity): Ash shouldn't observe the ProfileInfoCache at all.
28 void OnProfileWillBeRemoved(const base::FilePath& profile_path) override; 31 void OnProfileWillBeRemoved(const base::FilePath& profile_path) override;
29 32
30 private: 33 private:
31 friend struct DefaultSingletonTraits<AppListServiceAsh>; 34 friend struct base::DefaultSingletonTraits<AppListServiceAsh>;
32 35
33 AppListServiceAsh(); 36 AppListServiceAsh();
34 ~AppListServiceAsh() override; 37 ~AppListServiceAsh() override;
35 38
36 // Shows the app list if it isn't already showing and Switches to |state|, 39 // Shows the app list if it isn't already showing and Switches to |state|,
37 // unless it is |INVALID_STATE| (in which case, opens on the default state). 40 // unless it is |INVALID_STATE| (in which case, opens on the default state).
38 void ShowAndSwitchToState(app_list::AppListModel::State state); 41 void ShowAndSwitchToState(app_list::AppListModel::State state);
39 42
40 // AppListService overrides: 43 // AppListService overrides:
41 base::FilePath GetProfilePath(const base::FilePath& user_data_dir) override; 44 base::FilePath GetProfilePath(const base::FilePath& user_data_dir) override;
(...skipping 14 matching lines...) Expand all
56 // ApplistServiceImpl overrides: 59 // ApplistServiceImpl overrides:
57 void CreateForProfile(Profile* default_profile) override; 60 void CreateForProfile(Profile* default_profile) override;
58 void DestroyAppList() override; 61 void DestroyAppList() override;
59 62
60 scoped_ptr<AppListControllerDelegateAsh> controller_delegate_; 63 scoped_ptr<AppListControllerDelegateAsh> controller_delegate_;
61 64
62 DISALLOW_COPY_AND_ASSIGN(AppListServiceAsh); 65 DISALLOW_COPY_AND_ASSIGN(AppListServiceAsh);
63 }; 66 };
64 67
65 #endif // CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_ 68 #endif // CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/apps/chrome_app_window_client.cc ('k') | chrome/browser/ui/ash/app_list/app_list_service_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698