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 10 matching lines...) Expand all Loading... |
21 class ExtensionAppShimHandler : public AppShimHandler, | 21 class ExtensionAppShimHandler : public AppShimHandler, |
22 public content::NotificationObserver { | 22 public content::NotificationObserver { |
23 public: | 23 public: |
24 ExtensionAppShimHandler(); | 24 ExtensionAppShimHandler(); |
25 virtual ~ExtensionAppShimHandler(); | 25 virtual ~ExtensionAppShimHandler(); |
26 | 26 |
27 // AppShimHandler overrides: | 27 // AppShimHandler overrides: |
28 virtual bool OnShimLaunch(Host* host) OVERRIDE; | 28 virtual bool OnShimLaunch(Host* host) OVERRIDE; |
29 virtual void OnShimClose(Host* host) OVERRIDE; | 29 virtual void OnShimClose(Host* host) OVERRIDE; |
30 virtual void OnShimFocus(Host* host) OVERRIDE; | 30 virtual void OnShimFocus(Host* host) OVERRIDE; |
| 31 virtual void OnShimQuit(Host* host) OVERRIDE; |
31 | 32 |
32 protected: | 33 protected: |
33 typedef std::map<std::pair<Profile*, std::string>, AppShimHandler::Host*> | 34 typedef std::map<std::pair<Profile*, std::string>, AppShimHandler::Host*> |
34 HostMap; | 35 HostMap; |
35 | 36 |
36 // Exposed for testing. | 37 // Exposed for testing. |
37 HostMap& hosts() { return hosts_; } | 38 HostMap& hosts() { return hosts_; } |
38 content::NotificationRegistrar& registrar() { return registrar_; } | 39 content::NotificationRegistrar& registrar() { return registrar_; } |
39 | 40 |
40 private: | 41 private: |
(...skipping 10 matching lines...) Expand all Loading... |
51 void CloseShim(Profile* profile, const std::string& app_id); | 52 void CloseShim(Profile* profile, const std::string& app_id); |
52 | 53 |
53 HostMap hosts_; | 54 HostMap hosts_; |
54 | 55 |
55 content::NotificationRegistrar registrar_; | 56 content::NotificationRegistrar registrar_; |
56 }; | 57 }; |
57 | 58 |
58 } // namespace apps | 59 } // namespace apps |
59 | 60 |
60 #endif // APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_H_ | 61 #endif // APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_H_ |
OLD | NEW |