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

Side by Side Diff: ash/shell/window_watcher.h

Issue 1924703002: Rename gfx::Display/Screen to display::Display/Screen in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | ash/shell/window_watcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_SHELL_WINDOW_WATCHER_H_ 5 #ifndef ASH_SHELL_WINDOW_WATCHER_H_
6 #define ASH_SHELL_WINDOW_WATCHER_H_ 6 #define ASH_SHELL_WINDOW_WATCHER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 12
13 #include "ash/shelf/shelf_item_types.h" 13 #include "ash/shelf/shelf_item_types.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "ui/aura/window_observer.h" 17 #include "ui/aura/window_observer.h"
18 #include "ui/gfx/display_observer.h" 18 #include "ui/display/display_observer.h"
19 19
20 namespace aura { 20 namespace aura {
21 class Window; 21 class Window;
22 } 22 }
23 23
24 namespace ash { 24 namespace ash {
25 namespace shell { 25 namespace shell {
26 26
27 // TODO(sky): fix this class, its a bit broke with workspace2. 27 // TODO(sky): fix this class, its a bit broke with workspace2.
28 28
29 // WindowWatcher is responsible for listening for newly created windows and 29 // WindowWatcher is responsible for listening for newly created windows and
30 // creating items on the Shelf for them. 30 // creating items on the Shelf for them.
31 class WindowWatcher : public aura::WindowObserver, 31 class WindowWatcher : public aura::WindowObserver,
32 public gfx::DisplayObserver { 32 public display::DisplayObserver {
33 public: 33 public:
34 WindowWatcher(); 34 WindowWatcher();
35 ~WindowWatcher() override; 35 ~WindowWatcher() override;
36 36
37 aura::Window* GetWindowByID(ash::ShelfID id); 37 aura::Window* GetWindowByID(ash::ShelfID id);
38 38
39 // aura::WindowObserver overrides: 39 // aura::WindowObserver overrides:
40 void OnWindowAdded(aura::Window* new_window) override; 40 void OnWindowAdded(aura::Window* new_window) override;
41 void OnWillRemoveWindow(aura::Window* window) override; 41 void OnWillRemoveWindow(aura::Window* window) override;
42 42
43 // gfx::DisplayObserver overrides: 43 // display::DisplayObserver overrides:
44 void OnDisplayAdded(const gfx::Display& new_display) override; 44 void OnDisplayAdded(const display::Display& new_display) override;
45 void OnDisplayRemoved(const gfx::Display& old_display) override; 45 void OnDisplayRemoved(const display::Display& old_display) override;
46 void OnDisplayMetricsChanged(const gfx::Display& display, 46 void OnDisplayMetricsChanged(const display::Display& display,
47 uint32_t metrics) override; 47 uint32_t metrics) override;
48 48
49 private: 49 private:
50 class WorkspaceWindowWatcher; 50 class WorkspaceWindowWatcher;
51 51
52 typedef std::map<ash::ShelfID, aura::Window*> IDToWindow; 52 typedef std::map<ash::ShelfID, aura::Window*> IDToWindow;
53 53
54 // Maps from window to the id we gave it. 54 // Maps from window to the id we gave it.
55 IDToWindow id_to_window_; 55 IDToWindow id_to_window_;
56 56
57 std::unique_ptr<WorkspaceWindowWatcher> workspace_window_watcher_; 57 std::unique_ptr<WorkspaceWindowWatcher> workspace_window_watcher_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(WindowWatcher); 59 DISALLOW_COPY_AND_ASSIGN(WindowWatcher);
60 }; 60 };
61 61
62 } // namespace shell 62 } // namespace shell
63 } // namespace ash 63 } // namespace ash
64 64
65 #endif // ASH_SHELL_WINDOW_WATCHER_H_ 65 #endif // ASH_SHELL_WINDOW_WATCHER_H_
OLDNEW
« no previous file with comments | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | ash/shell/window_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698