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 <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "chrome/browser/apps/app_shim/app_shim_handler_mac.h" | 14 #include "chrome/browser/apps/app_shim/app_shim_handler_mac.h" |
15 #include "chrome/browser/ui/app_list/app_list_service_impl.h" | 15 #include "chrome/browser/ui/app_list/app_list_service_impl.h" |
16 | 16 |
17 @class AppListAnimationController; | 17 @class AppListAnimationController; |
18 | 18 |
| 19 namespace display { |
| 20 class Display; |
| 21 } |
| 22 |
19 namespace gfx { | 23 namespace gfx { |
20 class Display; | |
21 class Point; | 24 class Point; |
22 } | 25 } |
23 | 26 |
24 namespace display { | |
25 using Display = gfx::Display; | |
26 } | |
27 | |
28 // AppListServiceMac manages global resources needed for the app list to | 27 // AppListServiceMac manages global resources needed for the app list to |
29 // operate, and controls when and how the app list is opened and closed. | 28 // operate, and controls when and how the app list is opened and closed. |
30 class AppListServiceMac : public AppListServiceImpl, | 29 class AppListServiceMac : public AppListServiceImpl, |
31 public apps::AppShimHandler { | 30 public apps::AppShimHandler { |
32 public: | 31 public: |
33 ~AppListServiceMac() override; | 32 ~AppListServiceMac() override; |
34 | 33 |
35 // Finds the position for a window to anchor it to the dock. This chooses the | 34 // Finds the position for a window to anchor it to the dock. This chooses the |
36 // most appropriate position for the window based on whether the dock exists, | 35 // most appropriate position for the window based on whether the dock exists, |
37 // the position of the dock (calculated by the difference between the display | 36 // the position of the dock (calculated by the difference between the display |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 89 |
91 private: | 90 private: |
92 base::scoped_nsobject<AppListAnimationController> animation_controller_; | 91 base::scoped_nsobject<AppListAnimationController> animation_controller_; |
93 base::scoped_nsobject<NSRunningApplication> previously_active_application_; | 92 base::scoped_nsobject<NSRunningApplication> previously_active_application_; |
94 NSPoint last_start_origin_; | 93 NSPoint last_start_origin_; |
95 | 94 |
96 DISALLOW_COPY_AND_ASSIGN(AppListServiceMac); | 95 DISALLOW_COPY_AND_ASSIGN(AppListServiceMac); |
97 }; | 96 }; |
98 | 97 |
99 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_ | 98 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_ |
OLD | NEW |