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

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

Issue 2381183002: mash: Fix shelf window property use in Chrome. (Closed)
Patch Set: Address comments. Created 4 years, 2 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.h
diff --git a/chrome/browser/ui/ash/launcher/settings_window_observer.h b/chrome/browser/ui/ash/launcher/settings_window_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..5bbebbc717c6b544d3c6e46201a537d7dcbd5e0d
--- /dev/null
+++ b/chrome/browser/ui/ash/launcher/settings_window_observer.h
@@ -0,0 +1,31 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_SETTINGS_WINDOW_OBSERVER_H_
+#define CHROME_BROWSER_UI_ASH_LAUNCHER_SETTINGS_WINDOW_OBSERVER_H_
+
+#include "base/macros.h"
+#include "chrome/browser/ui/settings_window_manager_observer.h"
+#include "services/ui/public/cpp/window_tracker.h"
+#include "ui/aura/window_tracker.h"
+
+// Sets the window title and shelf item properties for settings windows.
+// Settings windows are not handled by BrowserShortcutLauncherItemController.
+class SettingsWindowObserver : public chrome::SettingsWindowManagerObserver {
+ public:
+ SettingsWindowObserver();
+ ~SettingsWindowObserver() override;
+
+ // SettingsWindowManagerObserver:
+ void OnNewSettingsWindow(Browser* settings_browser) override;
+
+ private:
+ // Window trackers that rename the Settings window in classic ash and mash.
+ std::unique_ptr<aura::WindowTracker> aura_window_tracker_;
+ std::unique_ptr<ui::WindowTracker> ui_window_tracker_;
+
+ DISALLOW_COPY_AND_ASSIGN(SettingsWindowObserver);
+};
+
+#endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SETTINGS_WINDOW_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698