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 APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ | 5 #ifndef APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ |
6 #define APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ | 6 #define APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 static void QuitAppForWindow(AppWindow* app_window); | 76 static void QuitAppForWindow(AppWindow* app_window); |
77 | 77 |
78 static void HideAppForWindow(AppWindow* app_window); | 78 static void HideAppForWindow(AppWindow* app_window); |
79 | 79 |
80 static void FocusAppForWindow(AppWindow* app_window); | 80 static void FocusAppForWindow(AppWindow* app_window); |
81 | 81 |
82 // Brings the window to the front without showing it and instructs the shim to | 82 // Brings the window to the front without showing it and instructs the shim to |
83 // request user attention. Returns false if there is no shim for this window. | 83 // request user attention. Returns false if there is no shim for this window. |
84 static bool RequestUserAttentionForWindow(AppWindow* app_window); | 84 static bool RequestUserAttentionForWindow(AppWindow* app_window); |
85 | 85 |
| 86 // Called by AppControllerMac when Chrome hides. |
| 87 static void OnChromeWillHide(); |
| 88 |
86 // AppShimHandler overrides: | 89 // AppShimHandler overrides: |
87 virtual void OnShimLaunch(Host* host, | 90 virtual void OnShimLaunch(Host* host, |
88 AppShimLaunchType launch_type, | 91 AppShimLaunchType launch_type, |
89 const std::vector<base::FilePath>& files) OVERRIDE; | 92 const std::vector<base::FilePath>& files) OVERRIDE; |
90 virtual void OnShimClose(Host* host) OVERRIDE; | 93 virtual void OnShimClose(Host* host) OVERRIDE; |
91 virtual void OnShimFocus(Host* host, | 94 virtual void OnShimFocus(Host* host, |
92 AppShimFocusType focus_type, | 95 AppShimFocusType focus_type, |
93 const std::vector<base::FilePath>& files) OVERRIDE; | 96 const std::vector<base::FilePath>& files) OVERRIDE; |
94 virtual void OnShimSetHidden(Host* host, bool hidden) OVERRIDE; | 97 virtual void OnShimSetHidden(Host* host, bool hidden) OVERRIDE; |
95 virtual void OnShimQuit(Host* host) OVERRIDE; | 98 virtual void OnShimQuit(Host* host) OVERRIDE; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 content::NotificationRegistrar registrar_; | 141 content::NotificationRegistrar registrar_; |
139 | 142 |
140 base::WeakPtrFactory<ExtensionAppShimHandler> weak_factory_; | 143 base::WeakPtrFactory<ExtensionAppShimHandler> weak_factory_; |
141 | 144 |
142 DISALLOW_COPY_AND_ASSIGN(ExtensionAppShimHandler); | 145 DISALLOW_COPY_AND_ASSIGN(ExtensionAppShimHandler); |
143 }; | 146 }; |
144 | 147 |
145 } // namespace apps | 148 } // namespace apps |
146 | 149 |
147 #endif // APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ | 150 #endif // APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ |
OLD | NEW |