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 #include "chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h" | 5 #include "chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h" |
6 | 6 |
7 #include "apps/app_lifetime_monitor_factory.h" | 7 #include "apps/app_lifetime_monitor_factory.h" |
8 #include "apps/launcher.h" | 8 #include "apps/launcher.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 } | 233 } |
234 | 234 |
235 void ExtensionAppShimHandler::Delegate::LaunchShim(Profile* profile, | 235 void ExtensionAppShimHandler::Delegate::LaunchShim(Profile* profile, |
236 const Extension* extension) { | 236 const Extension* extension) { |
237 web_app::MaybeLaunchShortcut( | 237 web_app::MaybeLaunchShortcut( |
238 web_app::ShortcutInfoForExtensionAndProfile(extension, profile)); | 238 web_app::ShortcutInfoForExtensionAndProfile(extension, profile)); |
239 } | 239 } |
240 | 240 |
241 void ExtensionAppShimHandler::Delegate::LaunchUserManager() { | 241 void ExtensionAppShimHandler::Delegate::LaunchUserManager() { |
242 UserManager::Show(base::FilePath(), | 242 UserManager::Show(base::FilePath(), |
243 profiles::USER_MANAGER_NO_TUTORIAL, | |
244 profiles::USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER); | 243 profiles::USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER); |
245 } | 244 } |
246 | 245 |
247 void ExtensionAppShimHandler::Delegate::MaybeTerminate() { | 246 void ExtensionAppShimHandler::Delegate::MaybeTerminate() { |
248 AppShimHandler::MaybeTerminate(); | 247 AppShimHandler::MaybeTerminate(); |
249 } | 248 } |
250 | 249 |
251 ExtensionAppShimHandler::ExtensionAppShimHandler() | 250 ExtensionAppShimHandler::ExtensionAppShimHandler() |
252 : delegate_(new Delegate), | 251 : delegate_(new Delegate), |
253 weak_factory_(this) { | 252 weak_factory_(this) { |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 AppBrowserMap::iterator it = app_browser_windows_.find(extension->id()); | 754 AppBrowserMap::iterator it = app_browser_windows_.find(extension->id()); |
756 if (it != app_browser_windows_.end()) { | 755 if (it != app_browser_windows_.end()) { |
757 BrowserSet& browsers = it->second; | 756 BrowserSet& browsers = it->second; |
758 browsers.erase(browser); | 757 browsers.erase(browser); |
759 if (browsers.empty()) | 758 if (browsers.empty()) |
760 OnAppDeactivated(browser->profile(), extension->id()); | 759 OnAppDeactivated(browser->profile(), extension->id()); |
761 } | 760 } |
762 } | 761 } |
763 | 762 |
764 } // namespace apps | 763 } // namespace apps |
OLD | NEW |