Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: apps/app_shim/extension_app_shim_handler_mac.h

Issue 14579005: Close all windows when app shim quits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698