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

Unified Diff: chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc

Issue 332163006: Manage settings window icon for multi profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browsertest Created 6 years, 6 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/ash/launcher/launcher_item_util.cc ('k') | chrome/browser/ui/settings_window_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc
diff --git a/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc b/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc
index ac2bb4ac64670e5f37242dfe37fe26f827755244..9e1321628808c0d7e30ee906776a955e4e9e9b8f 100644
--- a/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc
+++ b/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h"
+#include "ash/shelf/shelf_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
@@ -12,7 +13,9 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/settings_window_manager.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "grit/ash_resources.h"
MultiProfileBrowserStatusMonitor::MultiProfileBrowserStatusMonitor(
ChromeLauncherController* launcher_controller)
@@ -72,6 +75,24 @@ void MultiProfileBrowserStatusMonitor::ActiveUserChanged(
}
}
+ // Remove settings window icons not associated with this profile and create
+ // icons for windows associated with the current profile.
+ for (BrowserList::const_iterator it = browser_list->begin();
+ it != browser_list->end(); ++it) {
+ Browser* browser = *it;
+ if (!chrome::SettingsWindowManager::GetInstance()->IsSettingsBrowser(
+ browser)) {
+ continue;
+ }
+ if (multi_user_util::IsProfileFromActiveUser(browser->profile())) {
+ ash::SetShelfItemDetailsForDialogWindow(
+ browser->window()->GetNativeWindow(),
+ IDR_ASH_SHELF_ICON_SETTINGS);
+ } else {
+ ash::ClearShelfItemDetailsForWindow(browser->window()->GetNativeWindow());
+ }
+ }
+
// Update the browser state since some of the removals / adds above might have
// had an impact on the browser item.
UpdateBrowserItemState();
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_item_util.cc ('k') | chrome/browser/ui/settings_window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698