| 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 "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "chrome/browser/apps/app_shim/app_shim_handler_mac.h" | 12 #include "chrome/browser/apps/app_shim/app_shim_handler_mac.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; | |
| 18 @class AppListWindowController; | 17 @class AppListWindowController; |
| 19 template <typename T> struct DefaultSingletonTraits; | 18 template <typename T> struct DefaultSingletonTraits; |
| 19 @class WindowAnimationController; |
| 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 { | 26 namespace test { |
| 27 class AppListServiceMacTestApi; | 27 class AppListServiceMacTestApi; |
| 28 } | 28 } |
| 29 | 29 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 46 // AppKit space (Y positive is up). | 46 // AppKit space (Y positive is up). |
| 47 static void FindAnchorPoint(const gfx::Size& window_size, | 47 static void FindAnchorPoint(const gfx::Size& window_size, |
| 48 const gfx::Display& display, | 48 const gfx::Display& display, |
| 49 int primary_display_height, | 49 int primary_display_height, |
| 50 bool cursor_is_visible, | 50 bool cursor_is_visible, |
| 51 const gfx::Point& cursor, | 51 const gfx::Point& cursor, |
| 52 NSPoint* target_origin, | 52 NSPoint* target_origin, |
| 53 NSPoint* start_origin); | 53 NSPoint* start_origin); |
| 54 | 54 |
| 55 void ShowWindowNearDock(); | 55 void ShowWindowNearDock(); |
| 56 void WindowAnimationDidEnd(); | |
| 57 void InitWithProfilePath(Profile* initial_profile, | 56 void InitWithProfilePath(Profile* initial_profile, |
| 58 const base::FilePath& profile_path); | 57 const base::FilePath& profile_path); |
| 59 | 58 |
| 60 // AppListService overrides: | 59 // AppListService overrides: |
| 61 void Init(Profile* initial_profile) override; | 60 void Init(Profile* initial_profile) override; |
| 62 void ShowForProfile(Profile* requested_profile) override; | 61 void ShowForProfile(Profile* requested_profile) override; |
| 63 void DismissAppList() override; | 62 void DismissAppList() override; |
| 64 void ShowForCustomLauncherPage(Profile* profile) override; | 63 void ShowForCustomLauncherPage(Profile* profile) override; |
| 65 bool IsAppListVisible() const override; | 64 bool IsAppListVisible() const override; |
| 66 void EnableAppList(Profile* initial_profile, | 65 void EnableAppList(Profile* initial_profile, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 85 void OnShimSetHidden(apps::AppShimHandler::Host* host, bool hidden) override; | 84 void OnShimSetHidden(apps::AppShimHandler::Host* host, bool hidden) override; |
| 86 void OnShimQuit(apps::AppShimHandler::Host* host) override; | 85 void OnShimQuit(apps::AppShimHandler::Host* host) override; |
| 87 | 86 |
| 88 private: | 87 private: |
| 89 friend class test::AppListServiceMacTestApi; | 88 friend class test::AppListServiceMacTestApi; |
| 90 friend struct DefaultSingletonTraits<AppListServiceMac>; | 89 friend struct DefaultSingletonTraits<AppListServiceMac>; |
| 91 | 90 |
| 92 AppListServiceMac(); | 91 AppListServiceMac(); |
| 93 | 92 |
| 94 base::scoped_nsobject<AppListWindowController> window_controller_; | 93 base::scoped_nsobject<AppListWindowController> window_controller_; |
| 95 base::scoped_nsobject<AppListAnimationController> animation_controller_; | 94 base::scoped_nsobject<WindowAnimationController> animation_controller_; |
| 96 base::scoped_nsobject<NSRunningApplication> previously_active_application_; | 95 base::scoped_nsobject<NSRunningApplication> previously_active_application_; |
| 97 NSPoint last_start_origin_; | 96 NSPoint last_start_origin_; |
| 98 Profile* profile_; | 97 Profile* profile_; |
| 99 scoped_ptr<AppListControllerDelegateImpl> controller_delegate_; | 98 scoped_ptr<AppListControllerDelegateImpl> controller_delegate_; |
| 100 | 99 |
| 101 DISALLOW_COPY_AND_ASSIGN(AppListServiceMac); | 100 DISALLOW_COPY_AND_ASSIGN(AppListServiceMac); |
| 102 }; | 101 }; |
| 103 | 102 |
| 104 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_ | 103 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_ |
| OLD | NEW |