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/ui/ash/launcher/chrome_launcher_controller_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 return; | 481 return; |
482 } | 482 } |
483 | 483 |
484 // Create a temporary application launcher item and use it to see if there are | 484 // Create a temporary application launcher item and use it to see if there are |
485 // running instances. | 485 // running instances. |
486 std::unique_ptr<AppShortcutLauncherItemController> app_controller( | 486 std::unique_ptr<AppShortcutLauncherItemController> app_controller( |
487 AppShortcutLauncherItemController::Create(app_id, "", this)); | 487 AppShortcutLauncherItemController::Create(app_id, "", this)); |
488 if (!app_controller->GetRunningApplications().empty()) | 488 if (!app_controller->GetRunningApplications().empty()) |
489 app_controller->Activate(source); | 489 app_controller->Activate(source); |
490 else | 490 else |
491 LaunchApp(app_id, source, event_flags); | 491 LaunchApp(app_id, "", source, event_flags); |
492 } | 492 } |
493 | 493 |
494 extensions::LaunchType ChromeLauncherControllerImpl::GetLaunchType( | 494 extensions::LaunchType ChromeLauncherControllerImpl::GetLaunchType( |
495 ash::ShelfID id) { | 495 ash::ShelfID id) { |
496 const Extension* extension = | 496 const Extension* extension = |
497 GetExtensionForAppID(GetAppIDForShelfID(id), profile()); | 497 GetExtensionForAppID(GetAppIDForShelfID(id), profile()); |
498 | 498 |
499 // An extension can be unloaded/updated/unavailable at any time. | 499 // An extension can be unloaded/updated/unavailable at any time. |
500 if (!extension) | 500 if (!extension) |
501 return extensions::LAUNCH_TYPE_DEFAULT; | 501 return extensions::LAUNCH_TYPE_DEFAULT; |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1550 LauncherItemController* controller = GetLauncherItemController(item.id); | 1550 LauncherItemController* controller = GetLauncherItemController(item.id); |
1551 if (!controller || controller->image_set_by_controller()) | 1551 if (!controller || controller->image_set_by_controller()) |
1552 continue; | 1552 continue; |
1553 item.image = image; | 1553 item.image = image; |
1554 if (arc_deferred_launcher_) | 1554 if (arc_deferred_launcher_) |
1555 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); | 1555 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); |
1556 model_->Set(index, item); | 1556 model_->Set(index, item); |
1557 // It's possible we're waiting on more than one item, so don't break. | 1557 // It's possible we're waiting on more than one item, so don't break. |
1558 } | 1558 } |
1559 } | 1559 } |
OLD | NEW |