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 | |
10 #include "base/macros.h" | 8 #include "base/macros.h" |
11 #include "chrome/browser/ui/settings_window_manager_observer.h" | 9 #include "chrome/browser/ui/settings_window_manager_observer.h" |
| 10 #include "services/ui/public/cpp/window_tracker.h" |
12 #include "ui/aura/window_tracker.h" | 11 #include "ui/aura/window_tracker.h" |
13 | 12 |
14 // Sets the window title and shelf item properties for settings windows. | 13 // Sets the window title and shelf item properties for settings windows. |
15 // Settings windows are not handled by BrowserShortcutLauncherItemController. | 14 // Settings windows are not handled by BrowserShortcutLauncherItemController. |
16 class SettingsWindowObserver : public chrome::SettingsWindowManagerObserver { | 15 class SettingsWindowObserver : public chrome::SettingsWindowManagerObserver { |
17 public: | 16 public: |
18 SettingsWindowObserver(); | 17 SettingsWindowObserver(); |
19 ~SettingsWindowObserver() override; | 18 ~SettingsWindowObserver() override; |
20 | 19 |
21 // SettingsWindowManagerObserver: | 20 // SettingsWindowManagerObserver: |
22 void OnNewSettingsWindow(Browser* settings_browser) override; | 21 void OnNewSettingsWindow(Browser* settings_browser) override; |
23 | 22 |
24 private: | 23 private: |
25 // Set of windows whose title is forced to 'Settings.' | 24 // Window trackers that rename the Settings window in classic ash and mash. |
26 std::unique_ptr<aura::WindowTracker> aura_window_tracker_; | 25 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 |