OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SERVICE_COCOA_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_COCOA_MAC_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_COCOA_MAC_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_COCOA_MAC_H_ |
7 | 7 |
8 #include "chrome/browser/ui/app_list/app_list_service_mac.h" | 8 #include "chrome/browser/ui/app_list/app_list_service_mac.h" |
9 | 9 |
10 namespace test { | 10 namespace test { |
11 class AppListServiceMacTestApi; | 11 class AppListServiceMacTestApi; |
12 } | 12 } |
13 | 13 |
14 class AppListControllerDelegateImpl; | 14 class AppListControllerDelegateImpl; |
15 @class AppListWindowController; | 15 @class AppListWindowController; |
16 | 16 |
| 17 namespace base { |
17 template <typename T> | 18 template <typename T> |
18 struct DefaultSingletonTraits; | 19 struct DefaultSingletonTraits; |
| 20 } // namespace base |
19 | 21 |
20 // AppListServiceCocoaMac shows and hides the Cocoa app list on Mac. | 22 // AppListServiceCocoaMac shows and hides the Cocoa app list on Mac. |
21 class AppListServiceCocoaMac : public AppListServiceMac { | 23 class AppListServiceCocoaMac : public AppListServiceMac { |
22 public: | 24 public: |
23 ~AppListServiceCocoaMac() override; | 25 ~AppListServiceCocoaMac() override; |
24 | 26 |
25 static AppListServiceCocoaMac* GetInstance(); | 27 static AppListServiceCocoaMac* GetInstance(); |
26 | 28 |
27 // AppListService overrides: | 29 // AppListService overrides: |
28 void ShowForProfile(Profile* requested_profile) override; | 30 void ShowForProfile(Profile* requested_profile) override; |
29 Profile* GetCurrentAppListProfile() override; | 31 Profile* GetCurrentAppListProfile() override; |
30 AppListControllerDelegate* GetControllerDelegate() override; | 32 AppListControllerDelegate* GetControllerDelegate() override; |
31 | 33 |
32 // AppListServiceImpl overrides: | 34 // AppListServiceImpl overrides: |
33 void CreateForProfile(Profile* requested_profile) override; | 35 void CreateForProfile(Profile* requested_profile) override; |
34 void DestroyAppList() override; | 36 void DestroyAppList() override; |
35 | 37 |
36 protected: | 38 protected: |
37 // AppListServiceMac overrides: | 39 // AppListServiceMac overrides: |
38 NSWindow* GetNativeWindow() const override; | 40 NSWindow* GetNativeWindow() const override; |
39 bool ReadyToShow() override; | 41 bool ReadyToShow() override; |
40 | 42 |
41 private: | 43 private: |
42 friend class test::AppListServiceMacTestApi; | 44 friend class test::AppListServiceMacTestApi; |
43 friend struct DefaultSingletonTraits<AppListServiceCocoaMac>; | 45 friend struct base::DefaultSingletonTraits<AppListServiceCocoaMac>; |
44 | 46 |
45 AppListServiceCocoaMac(); | 47 AppListServiceCocoaMac(); |
46 | 48 |
47 Profile* profile_; | 49 Profile* profile_; |
48 base::scoped_nsobject<AppListWindowController> window_controller_; | 50 base::scoped_nsobject<AppListWindowController> window_controller_; |
49 scoped_ptr<AppListControllerDelegateImpl> controller_delegate_; | 51 scoped_ptr<AppListControllerDelegateImpl> controller_delegate_; |
50 | 52 |
51 DISALLOW_COPY_AND_ASSIGN(AppListServiceCocoaMac); | 53 DISALLOW_COPY_AND_ASSIGN(AppListServiceCocoaMac); |
52 }; | 54 }; |
53 | 55 |
54 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_COCOA_MAC_H_ | 56 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_COCOA_MAC_H_ |
OLD | NEW |