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

Unified Diff: chrome/browser/ui/views/ash/launcher/launcher_updater.cc

Issue 9649013: Show a different icon in the launcher for incognito windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Re-upload Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/ash/launcher/launcher_updater.h ('k') | ui/resources/ui_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ash/launcher/launcher_updater.cc
diff --git a/chrome/browser/ui/views/ash/launcher/launcher_updater.cc b/chrome/browser/ui/views/ash/launcher/launcher_updater.cc
index 8f3c604710fae8c582a3acac0183eaff55d6780d..23ccd381f5ddd101e84b99d0e8e052e042247173 100644
--- a/chrome/browser/ui/views/ash/launcher/launcher_updater.cc
+++ b/chrome/browser/ui/views/ash/launcher/launcher_updater.cc
@@ -38,6 +38,8 @@ LauncherUpdater::LauncherUpdater(aura::Window* window,
launcher_delegate_(delegate),
type_(type),
app_id_(app_id),
+ is_incognito_(tab_model->profile()->GetOriginalProfile() !=
+ tab_model->profile()),
item_id_(-1) {
}
@@ -272,7 +274,9 @@ void LauncherUpdater::UpdateAppTabState(TabContentsWrapper* tab,
launcher_delegate_->LauncherItemClosed(launcher_id);
CreateTabbedItem();
}
- ash::LauncherItem item(ash::TYPE_TABBED);
+ ash::LauncherItem item;
+ item.type = ash::TYPE_TABBED;
+ item.is_incognito = is_incognito_;
item.num_tabs = tab_model_->count();
launcher_model()->Set(launcher_model()->ItemIndexByID(item_id_), item);
} else {
@@ -325,7 +329,10 @@ void LauncherUpdater::RegisterAppItem(ash::LauncherID id,
void LauncherUpdater::CreateTabbedItem() {
DCHECK_EQ(-1, item_id_);
- item_id_ = launcher_delegate_->CreateTabbedLauncherItem(this);
+ item_id_ = launcher_delegate_->CreateTabbedLauncherItem(
+ this,
+ is_incognito_ ? ChromeLauncherDelegate::STATE_INCOGNITO :
+ ChromeLauncherDelegate::STATE_NOT_INCOGNITO);
}
bool LauncherUpdater::ContainsID(ash::LauncherID id, TabContentsWrapper** tab) {
« no previous file with comments | « chrome/browser/ui/views/ash/launcher/launcher_updater.h ('k') | ui/resources/ui_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698