Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc

Issue 13139004: Deprecate Browser::TYPE_PANEL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698