OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_SETTINGS_WINDOW_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_SETTINGS_WINDOW_OBSERVER_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_SETTINGS_WINDOW_OBSERVER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_SETTINGS_WINDOW_OBSERVER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "chrome/browser/ui/settings_window_manager_observer.h" | 11 #include "chrome/browser/ui/settings_window_manager_observer.h" |
10 #include "services/ui/public/cpp/window_tracker.h" | |
11 #include "ui/aura/window_tracker.h" | 12 #include "ui/aura/window_tracker.h" |
12 | 13 |
13 // Sets the window title and shelf item properties for settings windows. | 14 // Sets the window title and shelf item properties for settings windows. |
14 // Settings windows are not handled by BrowserShortcutLauncherItemController. | 15 // Settings windows are not handled by BrowserShortcutLauncherItemController. |
15 class SettingsWindowObserver : public chrome::SettingsWindowManagerObserver { | 16 class SettingsWindowObserver : public chrome::SettingsWindowManagerObserver { |
16 public: | 17 public: |
17 SettingsWindowObserver(); | 18 SettingsWindowObserver(); |
18 ~SettingsWindowObserver() override; | 19 ~SettingsWindowObserver() override; |
19 | 20 |
20 // SettingsWindowManagerObserver: | 21 // SettingsWindowManagerObserver: |
21 void OnNewSettingsWindow(Browser* settings_browser) override; | 22 void OnNewSettingsWindow(Browser* settings_browser) override; |
22 | 23 |
23 private: | 24 private: |
24 // Window trackers that rename the Settings window in classic ash and mash. | 25 // Set of windows whose title is forced to 'Settings.' |
25 std::unique_ptr<aura::WindowTracker> aura_window_tracker_; | 26 std::unique_ptr<aura::WindowTracker> aura_window_tracker_; |
26 std::unique_ptr<ui::WindowTracker> ui_window_tracker_; | |
27 | 27 |
28 DISALLOW_COPY_AND_ASSIGN(SettingsWindowObserver); | 28 DISALLOW_COPY_AND_ASSIGN(SettingsWindowObserver); |
29 }; | 29 }; |
30 | 30 |
31 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SETTINGS_WINDOW_OBSERVER_H_ | 31 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SETTINGS_WINDOW_OBSERVER_H_ |
OLD | NEW |