| 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_H_ | 5 #ifndef APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_H_ |
| 6 #define APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_H_ | 6 #define APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 virtual void MaybeTerminate(); | 62 virtual void MaybeTerminate(); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 ExtensionAppShimHandler(); | 65 ExtensionAppShimHandler(); |
| 66 virtual ~ExtensionAppShimHandler(); | 66 virtual ~ExtensionAppShimHandler(); |
| 67 | 67 |
| 68 AppShimHandler::Host* FindHost(Profile* profile, const std::string& app_id); | 68 AppShimHandler::Host* FindHost(Profile* profile, const std::string& app_id); |
| 69 | 69 |
| 70 static void QuitAppForWindow(ShellWindow* shell_window); | 70 static void QuitAppForWindow(ShellWindow* shell_window); |
| 71 | 71 |
| 72 static void HideAppForWindow(ShellWindow* shell_window); |
| 73 |
| 72 // Brings the window to the front without showing it and instructs the shim to | 74 // Brings the window to the front without showing it and instructs the shim to |
| 73 // request user attention. Returns false if there is no shim for this window. | 75 // request user attention. Returns false if there is no shim for this window. |
| 74 static bool RequestUserAttentionForWindow(ShellWindow* shell_window); | 76 static bool RequestUserAttentionForWindow(ShellWindow* shell_window); |
| 75 | 77 |
| 76 // AppShimHandler overrides: | 78 // AppShimHandler overrides: |
| 77 virtual void OnShimLaunch(Host* host, AppShimLaunchType launch_type) OVERRIDE; | 79 virtual void OnShimLaunch(Host* host, AppShimLaunchType launch_type) OVERRIDE; |
| 78 virtual void OnShimClose(Host* host) OVERRIDE; | 80 virtual void OnShimClose(Host* host) OVERRIDE; |
| 79 virtual void OnShimFocus(Host* host, AppShimFocusType focus_type) OVERRIDE; | 81 virtual void OnShimFocus(Host* host, AppShimFocusType focus_type) OVERRIDE; |
| 80 virtual void OnShimSetHidden(Host* host, bool hidden) OVERRIDE; | 82 virtual void OnShimSetHidden(Host* host, bool hidden) OVERRIDE; |
| 81 virtual void OnShimQuit(Host* host) OVERRIDE; | 83 virtual void OnShimQuit(Host* host) OVERRIDE; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 bool browser_opened_ever_; | 121 bool browser_opened_ever_; |
| 120 | 122 |
| 121 base::WeakPtrFactory<ExtensionAppShimHandler> weak_factory_; | 123 base::WeakPtrFactory<ExtensionAppShimHandler> weak_factory_; |
| 122 | 124 |
| 123 DISALLOW_COPY_AND_ASSIGN(ExtensionAppShimHandler); | 125 DISALLOW_COPY_AND_ASSIGN(ExtensionAppShimHandler); |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace apps | 128 } // namespace apps |
| 127 | 129 |
| 128 #endif // APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_H_ | 130 #endif // APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_H_ |
| OLD | NEW |