| 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_APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ | 5 #ifndef CHROME_BROWSER_APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ |
| 6 #define CHROME_BROWSER_APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ | 6 #define CHROME_BROWSER_APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 static void RequestUserAttentionForWindow( | 88 static void RequestUserAttentionForWindow( |
| 89 extensions::AppWindow* app_window, | 89 extensions::AppWindow* app_window, |
| 90 AppShimAttentionType attention_type); | 90 AppShimAttentionType attention_type); |
| 91 | 91 |
| 92 // Called by AppControllerMac when Chrome hides. | 92 // Called by AppControllerMac when Chrome hides. |
| 93 static void OnChromeWillHide(); | 93 static void OnChromeWillHide(); |
| 94 | 94 |
| 95 // AppShimHandler overrides: | 95 // AppShimHandler overrides: |
| 96 virtual void OnShimLaunch(Host* host, | 96 virtual void OnShimLaunch(Host* host, |
| 97 AppShimLaunchType launch_type, | 97 AppShimLaunchType launch_type, |
| 98 const std::vector<base::FilePath>& files) OVERRIDE; | 98 const std::vector<base::FilePath>& files) override; |
| 99 virtual void OnShimClose(Host* host) OVERRIDE; | 99 virtual void OnShimClose(Host* host) override; |
| 100 virtual void OnShimFocus(Host* host, | 100 virtual void OnShimFocus(Host* host, |
| 101 AppShimFocusType focus_type, | 101 AppShimFocusType focus_type, |
| 102 const std::vector<base::FilePath>& files) OVERRIDE; | 102 const std::vector<base::FilePath>& files) override; |
| 103 virtual void OnShimSetHidden(Host* host, bool hidden) OVERRIDE; | 103 virtual void OnShimSetHidden(Host* host, bool hidden) override; |
| 104 virtual void OnShimQuit(Host* host) OVERRIDE; | 104 virtual void OnShimQuit(Host* host) override; |
| 105 | 105 |
| 106 // AppLifetimeMonitor::Observer overrides: | 106 // AppLifetimeMonitor::Observer overrides: |
| 107 virtual void OnAppStart(Profile* profile, const std::string& app_id) OVERRIDE; | 107 virtual void OnAppStart(Profile* profile, const std::string& app_id) override; |
| 108 virtual void OnAppActivated(Profile* profile, | 108 virtual void OnAppActivated(Profile* profile, |
| 109 const std::string& app_id) OVERRIDE; | 109 const std::string& app_id) override; |
| 110 virtual void OnAppDeactivated(Profile* profile, | 110 virtual void OnAppDeactivated(Profile* profile, |
| 111 const std::string& app_id) OVERRIDE; | 111 const std::string& app_id) override; |
| 112 virtual void OnAppStop(Profile* profile, const std::string& app_id) OVERRIDE; | 112 virtual void OnAppStop(Profile* profile, const std::string& app_id) override; |
| 113 virtual void OnChromeTerminating() OVERRIDE; | 113 virtual void OnChromeTerminating() override; |
| 114 | 114 |
| 115 // content::NotificationObserver overrides: | 115 // content::NotificationObserver overrides: |
| 116 virtual void Observe(int type, | 116 virtual void Observe(int type, |
| 117 const content::NotificationSource& source, | 117 const content::NotificationSource& source, |
| 118 const content::NotificationDetails& details) OVERRIDE; | 118 const content::NotificationDetails& details) override; |
| 119 | 119 |
| 120 protected: | 120 protected: |
| 121 typedef std::map<std::pair<Profile*, std::string>, AppShimHandler::Host*> | 121 typedef std::map<std::pair<Profile*, std::string>, AppShimHandler::Host*> |
| 122 HostMap; | 122 HostMap; |
| 123 | 123 |
| 124 // Exposed for testing. | 124 // Exposed for testing. |
| 125 void set_delegate(Delegate* delegate); | 125 void set_delegate(Delegate* delegate); |
| 126 HostMap& hosts() { return hosts_; } | 126 HostMap& hosts() { return hosts_; } |
| 127 content::NotificationRegistrar& registrar() { return registrar_; } | 127 content::NotificationRegistrar& registrar() { return registrar_; } |
| 128 | 128 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 150 content::NotificationRegistrar registrar_; | 150 content::NotificationRegistrar registrar_; |
| 151 | 151 |
| 152 base::WeakPtrFactory<ExtensionAppShimHandler> weak_factory_; | 152 base::WeakPtrFactory<ExtensionAppShimHandler> weak_factory_; |
| 153 | 153 |
| 154 DISALLOW_COPY_AND_ASSIGN(ExtensionAppShimHandler); | 154 DISALLOW_COPY_AND_ASSIGN(ExtensionAppShimHandler); |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 } // namespace apps | 157 } // namespace apps |
| 158 | 158 |
| 159 #endif // CHROME_BROWSER_APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ | 159 #endif // CHROME_BROWSER_APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ |
| OLD | NEW |