Chromium Code Reviews| 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 "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 // IPC::Sender implementation. | 53 // IPC::Sender implementation. |
| 54 virtual bool Send(IPC::Message* message) OVERRIDE; | 54 virtual bool Send(IPC::Message* message) OVERRIDE; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 // The app shim process is requesting that an app be launched. Once it has | 57 // The app shim process is requesting that an app be launched. Once it has |
| 58 // done so the |profile| and |app_id| are stored, and all future messages | 58 // done so the |profile| and |app_id| are stored, and all future messages |
| 59 // from the app shim relate to the app it launched. It is an error for the | 59 // from the app shim relate to the app it launched. It is an error for the |
| 60 // app shim to send multiple launch messages. | 60 // app shim to send multiple launch messages. |
| 61 void OnLaunchApp(std::string profile, std::string app_id); | 61 void OnLaunchApp(std::string profile, std::string app_id); |
| 62 | 62 |
| 63 // TODO comment | |
|
koz (OOO until 15th September)
2013/03/18 03:33:12
TODO
jeremya
2013/03/18 04:54:05
Done.
| |
| 64 void OnFocus(); | |
| 65 | |
| 63 bool LaunchAppImpl(const std::string& profile_dir, const std::string& app_id); | 66 bool LaunchAppImpl(const std::string& profile_dir, const std::string& app_id); |
| 64 | 67 |
| 65 // The AppShimHost listens to the NOTIFICATION_EXTENSION_HOST_DESTROYED | 68 // The AppShimHost listens to the NOTIFICATION_EXTENSION_HOST_DESTROYED |
| 66 // message to detect when the app closes. When that happens, the AppShimHost | 69 // message to detect when the app closes. When that happens, the AppShimHost |
| 67 // closes the channel, which causes the app shim process to quit. | 70 // closes the channel, which causes the app shim process to quit. |
| 68 virtual void Observe(int type, | 71 virtual void Observe(int type, |
| 69 const content::NotificationSource& source, | 72 const content::NotificationSource& source, |
| 70 const content::NotificationDetails& details) OVERRIDE; | 73 const content::NotificationDetails& details) OVERRIDE; |
| 71 | 74 |
| 72 // Closes the channel and destroys the AppShimHost. | 75 // Closes the channel and destroys the AppShimHost. |
| 73 void Close(); | 76 void Close(); |
| 74 | 77 |
| 75 scoped_ptr<IPC::ChannelProxy> channel_; | 78 scoped_ptr<IPC::ChannelProxy> channel_; |
| 76 std::string app_id_; | 79 std::string app_id_; |
| 77 Profile* profile_; | 80 Profile* profile_; |
| 78 content::NotificationRegistrar registrar_; | 81 content::NotificationRegistrar registrar_; |
| 79 }; | 82 }; |
| 80 | 83 |
| 81 #endif // CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MAC_H_ | 84 #endif // CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MAC_H_ |
| OLD | NEW |