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 "apps/app_shim/extension_app_shim_handler_mac.h" | 5 #include "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/app_shim/app_shim_messages.h" | 8 #include "apps/app_shim/app_shim_messages.h" |
9 #include "apps/shell_window.h" | 9 #include "apps/shell_window.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 void ExtensionAppShimHandler::OnAppActivated(Profile* profile, | 340 void ExtensionAppShimHandler::OnAppActivated(Profile* profile, |
341 const std::string& app_id) { | 341 const std::string& app_id) { |
342 const extensions::Extension* extension = | 342 const extensions::Extension* extension = |
343 delegate_->GetAppExtension(profile, app_id); | 343 delegate_->GetAppExtension(profile, app_id); |
344 if (!extension) | 344 if (!extension) |
345 return; | 345 return; |
346 | 346 |
347 HostMap::iterator it = hosts_.find(make_pair(profile, app_id)); | 347 HostMap::iterator it = hosts_.find(make_pair(profile, app_id)); |
348 if (it != hosts_.end()) { | 348 if (it != hosts_.end()) { |
349 it->second->OnAppLaunchComplete(APP_SHIM_LAUNCH_SUCCESS); | 349 it->second->OnAppLaunchComplete(APP_SHIM_LAUNCH_SUCCESS); |
| 350 OnShimFocus(it->second, APP_SHIM_FOCUS_NORMAL); |
350 return; | 351 return; |
351 } | 352 } |
352 | 353 |
353 delegate_->LaunchShim(profile, extension); | 354 delegate_->LaunchShim(profile, extension); |
354 } | 355 } |
355 | 356 |
356 void ExtensionAppShimHandler::OnAppDeactivated(Profile* profile, | 357 void ExtensionAppShimHandler::OnAppDeactivated(Profile* profile, |
357 const std::string& app_id) {} | 358 const std::string& app_id) {} |
358 | 359 |
359 void ExtensionAppShimHandler::OnAppStop(Profile* profile, | 360 void ExtensionAppShimHandler::OnAppStop(Profile* profile, |
360 const std::string& app_id) {} | 361 const std::string& app_id) {} |
361 | 362 |
362 void ExtensionAppShimHandler::OnChromeTerminating() {} | 363 void ExtensionAppShimHandler::OnChromeTerminating() {} |
363 | 364 |
364 } // namespace apps | 365 } // namespace apps |
OLD | NEW |