| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "apps/app_shim/app_shim_handler_mac.h" | 10 #include "apps/app_shim/app_shim_handler_mac.h" |
| 11 #include "base/mac/scoped_nsobject.h" | 11 #include "base/mac/scoped_nsobject.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "chrome/browser/ui/app_list/app_list_service_impl.h" | 13 #include "chrome/browser/ui/app_list/app_list_service_impl.h" |
| 14 | 14 |
| 15 class AppListControllerDelegateImpl; | 15 class AppListControllerDelegateImpl; |
| 16 | 16 |
| 17 @class AppListAnimationController; | 17 @class AppListAnimationController; |
| 18 @class AppListWindowController; | 18 @class AppListWindowController; |
| 19 template <typename T> struct DefaultSingletonTraits; | 19 template <typename T> struct DefaultSingletonTraits; |
| 20 | 20 |
| 21 namespace gfx { | 21 namespace gfx { |
| 22 class Display; | 22 class Display; |
| 23 class Point; | 23 class Point; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace test { |
| 27 class AppListServiceMacTestApi; |
| 28 } |
| 29 |
| 26 // AppListServiceMac manages global resources needed for the app list to | 30 // AppListServiceMac manages global resources needed for the app list to |
| 27 // operate, and controls when the app list is opened and closed. | 31 // operate, and controls when the app list is opened and closed. |
| 28 class AppListServiceMac : public AppListServiceImpl, | 32 class AppListServiceMac : public AppListServiceImpl, |
| 29 public apps::AppShimHandler { | 33 public apps::AppShimHandler { |
| 30 public: | 34 public: |
| 31 virtual ~AppListServiceMac(); | 35 virtual ~AppListServiceMac(); |
| 32 | 36 |
| 33 static AppListServiceMac* GetInstance(); | 37 static AppListServiceMac* GetInstance(); |
| 34 | 38 |
| 35 // Finds the position for a window to anchor it to the dock. This chooses the | 39 // Finds the position for a window to anchor it to the dock. This chooses the |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 const std::vector<base::FilePath>& files) OVERRIDE; | 77 const std::vector<base::FilePath>& files) OVERRIDE; |
| 74 virtual void OnShimClose(apps::AppShimHandler::Host* host) OVERRIDE; | 78 virtual void OnShimClose(apps::AppShimHandler::Host* host) OVERRIDE; |
| 75 virtual void OnShimFocus(apps::AppShimHandler::Host* host, | 79 virtual void OnShimFocus(apps::AppShimHandler::Host* host, |
| 76 apps::AppShimFocusType focus_type, | 80 apps::AppShimFocusType focus_type, |
| 77 const std::vector<base::FilePath>& files) OVERRIDE; | 81 const std::vector<base::FilePath>& files) OVERRIDE; |
| 78 virtual void OnShimSetHidden(apps::AppShimHandler::Host* host, | 82 virtual void OnShimSetHidden(apps::AppShimHandler::Host* host, |
| 79 bool hidden) OVERRIDE; | 83 bool hidden) OVERRIDE; |
| 80 virtual void OnShimQuit(apps::AppShimHandler::Host* host) OVERRIDE; | 84 virtual void OnShimQuit(apps::AppShimHandler::Host* host) OVERRIDE; |
| 81 | 85 |
| 82 private: | 86 private: |
| 87 friend class test::AppListServiceMacTestApi; |
| 83 friend struct DefaultSingletonTraits<AppListServiceMac>; | 88 friend struct DefaultSingletonTraits<AppListServiceMac>; |
| 84 | 89 |
| 85 AppListServiceMac(); | 90 AppListServiceMac(); |
| 86 | 91 |
| 87 base::scoped_nsobject<AppListWindowController> window_controller_; | 92 base::scoped_nsobject<AppListWindowController> window_controller_; |
| 88 base::scoped_nsobject<AppListAnimationController> animation_controller_; | 93 base::scoped_nsobject<AppListAnimationController> animation_controller_; |
| 89 base::scoped_nsobject<NSRunningApplication> previously_active_application_; | 94 base::scoped_nsobject<NSRunningApplication> previously_active_application_; |
| 90 NSPoint last_start_origin_; | 95 NSPoint last_start_origin_; |
| 91 Profile* profile_; | 96 Profile* profile_; |
| 92 scoped_ptr<AppListControllerDelegateImpl> controller_delegate_; | 97 scoped_ptr<AppListControllerDelegateImpl> controller_delegate_; |
| 93 | 98 |
| 94 DISALLOW_COPY_AND_ASSIGN(AppListServiceMac); | 99 DISALLOW_COPY_AND_ASSIGN(AppListServiceMac); |
| 95 }; | 100 }; |
| 96 | 101 |
| 97 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_ | 102 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_ |
| OLD | NEW |