Chromium Code Reviews| 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..1d3c2ec3fcd9c8d8d0d30a68f589ca4e93a7e8bc |
| --- /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 used to rename the Settings window in cash and mash. |
|
James Cook
2016/10/03 20:38:12
super nit: I'm trying to standardize on "classic a
msw
2016/10/03 22:02:24
Done.
|
| + 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_ |