| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_per_app.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/launcher/launcher_model.h" | 10 #include "ash/launcher/launcher_model.h" |
| (...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 DCHECK(browser); | 1510 DCHECK(browser); |
| 1511 if (browser->window()->IsActive()) | 1511 if (browser->window()->IsActive()) |
| 1512 status = ash::STATUS_ACTIVE; | 1512 status = ash::STATUS_ACTIVE; |
| 1513 else | 1513 else |
| 1514 status = ash::STATUS_RUNNING; | 1514 status = ash::STATUS_RUNNING; |
| 1515 } | 1515 } |
| 1516 item.status = status; | 1516 item.status = status; |
| 1517 | 1517 |
| 1518 model_->AddAt(index, item); | 1518 model_->AddAt(index, item); |
| 1519 | 1519 |
| 1520 if (controller->type() != LauncherItemController::TYPE_EXTENSION_PANEL) | 1520 app_icon_loader_->FetchImage(app_id); |
| 1521 app_icon_loader_->FetchImage(app_id); | |
| 1522 | 1521 |
| 1523 return id; | 1522 return id; |
| 1524 } | 1523 } |
| 1525 | 1524 |
| 1526 bool ChromeLauncherControllerPerApp::HasItemController( | 1525 bool ChromeLauncherControllerPerApp::HasItemController( |
| 1527 ash::LauncherID id) const { | 1526 ash::LauncherID id) const { |
| 1528 return id_to_item_controller_map_.find(id) != | 1527 return id_to_item_controller_map_.find(id) != |
| 1529 id_to_item_controller_map_.end(); | 1528 id_to_item_controller_map_.end(); |
| 1530 } | 1529 } |
| 1531 | 1530 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1600 GetLauncherIDForAppID(web_app::GetExtensionIdFromApplicationName( | 1599 GetLauncherIDForAppID(web_app::GetExtensionIdFromApplicationName( |
| 1601 browser->app_name())) <= 0)); | 1600 browser->app_name())) <= 0)); |
| 1602 } | 1601 } |
| 1603 | 1602 |
| 1604 bool ChromeLauncherControllerPerApp::IsIncognito( | 1603 bool ChromeLauncherControllerPerApp::IsIncognito( |
| 1605 content::WebContents* web_contents) const { | 1604 content::WebContents* web_contents) const { |
| 1606 const Profile* profile = | 1605 const Profile* profile = |
| 1607 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 1606 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
| 1608 return profile->IsOffTheRecord() && !profile->IsGuestSession(); | 1607 return profile->IsOffTheRecord() && !profile->IsGuestSession(); |
| 1609 } | 1608 } |
| OLD | NEW |