| 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 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 DCHECK(browser); | 1475 DCHECK(browser); |
| 1476 if (browser->window()->IsActive()) | 1476 if (browser->window()->IsActive()) |
| 1477 status = ash::STATUS_ACTIVE; | 1477 status = ash::STATUS_ACTIVE; |
| 1478 else | 1478 else |
| 1479 status = ash::STATUS_RUNNING; | 1479 status = ash::STATUS_RUNNING; |
| 1480 } | 1480 } |
| 1481 item.status = status; | 1481 item.status = status; |
| 1482 | 1482 |
| 1483 model_->AddAt(index, item); | 1483 model_->AddAt(index, item); |
| 1484 | 1484 |
| 1485 if (controller->type() != LauncherItemController::TYPE_EXTENSION_PANEL) | 1485 app_icon_loader_->FetchImage(app_id); |
| 1486 app_icon_loader_->FetchImage(app_id); | |
| 1487 | 1486 |
| 1488 return id; | 1487 return id; |
| 1489 } | 1488 } |
| 1490 | 1489 |
| 1491 bool ChromeLauncherControllerPerApp::HasItemController( | 1490 bool ChromeLauncherControllerPerApp::HasItemController( |
| 1492 ash::LauncherID id) const { | 1491 ash::LauncherID id) const { |
| 1493 return id_to_item_controller_map_.find(id) != | 1492 return id_to_item_controller_map_.find(id) != |
| 1494 id_to_item_controller_map_.end(); | 1493 id_to_item_controller_map_.end(); |
| 1495 } | 1494 } |
| 1496 | 1495 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 GetLauncherIDForAppID(web_app::GetExtensionIdFromApplicationName( | 1564 GetLauncherIDForAppID(web_app::GetExtensionIdFromApplicationName( |
| 1566 browser->app_name())) <= 0)); | 1565 browser->app_name())) <= 0)); |
| 1567 } | 1566 } |
| 1568 | 1567 |
| 1569 bool ChromeLauncherControllerPerApp::IsIncognito( | 1568 bool ChromeLauncherControllerPerApp::IsIncognito( |
| 1570 content::WebContents* web_contents) const { | 1569 content::WebContents* web_contents) const { |
| 1571 const Profile* profile = | 1570 const Profile* profile = |
| 1572 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 1571 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
| 1573 return profile->IsOffTheRecord() && !profile->IsGuestSession(); | 1572 return profile->IsOffTheRecord() && !profile->IsGuestSession(); |
| 1574 } | 1573 } |
| OLD | NEW |