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

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

Issue 2860503002: mash: Replace int ShelfIDs with AppLaunchID strings. (Closed)
Patch Set: Restore AppLaunchId class via using ShelfID = AppLaunchId; cleanup. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/settings_window_observer.cc
diff --git a/chrome/browser/ui/ash/launcher/settings_window_observer.cc b/chrome/browser/ui/ash/launcher/settings_window_observer.cc
index c7fa01abeea8768ab2cb4fb4a457deb9062a13b7..2623064381802260507439597798d2f0cdc0790f 100644
--- a/chrome/browser/ui/ash/launcher/settings_window_observer.cc
+++ b/chrome/browser/ui/ash/launcher/settings_window_observer.cc
@@ -52,6 +52,9 @@ SettingsWindowObserver::~SettingsWindowObserver() {
void SettingsWindowObserver::OnNewSettingsWindow(Browser* settings_browser) {
aura::Window* window = settings_browser->window()->GetNativeWindow();
window->SetTitle(l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE));
+ // An app id for settings windows, also used to identify the shelf item.
+ static constexpr const char kSettingsAppID[] = "Settings";
James Cook 2017/05/04 16:38:49 Are all of "static constexpr const" needed here?
msw 2017/05/04 19:05:58 Done.
+ window->SetProperty(ash::kShelfIDKey, new ash::ShelfID(kSettingsAppID));
window->SetProperty<int>(ash::kShelfItemTypeKey, ash::TYPE_DIALOG);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
// The new gfx::ImageSkia instance is owned by the window itself.

Powered by Google App Engine
This is Rietveld 408576698