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_WEB_APPLICATIONS_APP_SHIM_HOST_MAC_H_ | 5 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MAC_H_ |
6 #define CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MAC_H_ | 6 #define CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MAC_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "apps/app_shim/app_shim_handler_mac.h" | 10 #include "apps/app_shim/app_shim_handler_mac.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // done so the |profile| and |app_id| are stored, and all future messages | 55 // done so the |profile| and |app_id| are stored, and all future messages |
56 // from the app shim relate to the app it launched. It is an error for the | 56 // from the app shim relate to the app it launched. It is an error for the |
57 // app shim to send multiple launch messages. | 57 // app shim to send multiple launch messages. |
58 void OnLaunchApp(std::string profile, std::string app_id); | 58 void OnLaunchApp(std::string profile, std::string app_id); |
59 | 59 |
60 // Called when the app shim process notifies that the app should be brought | 60 // Called when the app shim process notifies that the app should be brought |
61 // to the front (i.e. the user has clicked on the app's icon in the dock or | 61 // to the front (i.e. the user has clicked on the app's icon in the dock or |
62 // Cmd+Tabbed to it.) | 62 // Cmd+Tabbed to it.) |
63 void OnFocus(); | 63 void OnFocus(); |
64 | 64 |
| 65 // Called when the app shim process notifies that the app should quit. |
| 66 void OnQuit(); |
| 67 |
65 // apps::AppShimHandler::Host overrides: | 68 // apps::AppShimHandler::Host overrides: |
66 virtual void OnAppClosed() OVERRIDE; | 69 virtual void OnAppClosed() OVERRIDE; |
67 virtual Profile* GetProfile() const OVERRIDE; | 70 virtual Profile* GetProfile() const OVERRIDE; |
68 virtual std::string GetAppId() const OVERRIDE; | 71 virtual std::string GetAppId() const OVERRIDE; |
69 | 72 |
70 // Closes the channel and destroys the AppShimHost. | 73 // Closes the channel and destroys the AppShimHost. |
71 void Close(); | 74 void Close(); |
72 | 75 |
73 scoped_ptr<IPC::ChannelProxy> channel_; | 76 scoped_ptr<IPC::ChannelProxy> channel_; |
74 std::string app_id_; | 77 std::string app_id_; |
75 Profile* profile_; | 78 Profile* profile_; |
76 }; | 79 }; |
77 | 80 |
78 #endif // CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MAC_H_ | 81 #endif // CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MAC_H_ |
OLD | NEW |