| 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_APP_SHIM_HANDLER_MAC_H_ | 5 #ifndef APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_ |
| 6 #define APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_ | 6 #define APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "apps/app_shim/app_shim_launch.h" | 10 #include "apps/app_shim/app_shim_launch.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 | 12 |
| 13 class Profile; | 13 class Profile; |
| 14 | 14 |
| 15 namespace apps { | 15 namespace apps { |
| 16 | 16 |
| 17 // Registrar, and interface for services that can handle interactions with OSX | 17 // Registrar, and interface for services that can handle interactions with OSX |
| 18 // shim processes. | 18 // shim processes. |
| 19 class AppShimHandler { | 19 class AppShimHandler { |
| 20 public: | 20 public: |
| 21 class Host { | 21 class Host { |
| 22 public: | 22 public: |
| 23 // Invoked when the app is successfully launched. | 23 // Invoked when the app is successfully launched. |
| 24 virtual void OnAppLaunchComplete(AppShimLaunchResult result) = 0; | 24 virtual void OnAppLaunchComplete(AppShimLaunchResult result) = 0; |
| 25 // Invoked when the app is closed in the browser process. | 25 // Invoked when the app is closed in the browser process. |
| 26 virtual void OnAppClosed() = 0; | 26 virtual void OnAppClosed() = 0; |
| 27 // Invoked when the app should be hidden. |
| 28 virtual void OnAppHide() = 0; |
| 27 // Invoked when the app is requesting user attention. | 29 // Invoked when the app is requesting user attention. |
| 28 virtual void OnAppRequestUserAttention() = 0; | 30 virtual void OnAppRequestUserAttention() = 0; |
| 29 | 31 |
| 30 // Allows the handler to determine which app this host corresponds to. | 32 // Allows the handler to determine which app this host corresponds to. |
| 31 virtual base::FilePath GetProfilePath() const = 0; | 33 virtual base::FilePath GetProfilePath() const = 0; |
| 32 virtual std::string GetAppId() const = 0; | 34 virtual std::string GetAppId() const = 0; |
| 33 | 35 |
| 34 protected: | 36 protected: |
| 35 virtual ~Host() {} | 37 virtual ~Host() {} |
| 36 }; | 38 }; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 virtual void OnShimQuit(Host* host) = 0; | 71 virtual void OnShimQuit(Host* host) = 0; |
| 70 | 72 |
| 71 protected: | 73 protected: |
| 72 AppShimHandler() {} | 74 AppShimHandler() {} |
| 73 virtual ~AppShimHandler() {} | 75 virtual ~AppShimHandler() {} |
| 74 }; | 76 }; |
| 75 | 77 |
| 76 } // namespace apps | 78 } // namespace apps |
| 77 | 79 |
| 78 #endif // APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_ | 80 #endif // APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_ |
| OLD | NEW |