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

Side by Side Diff: ash/aura/wm_shell_aura.h

Issue 2267023003: ash: Eliminate PointerWatcherDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/aura/pointer_watcher_adapter_unittest.cc ('k') | ash/aura/wm_shell_aura.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 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 ASH_AURA_WM_SHELL_AURA_H_ 5 #ifndef ASH_AURA_WM_SHELL_AURA_H_
6 #define ASH_AURA_WM_SHELL_AURA_H_ 6 #define ASH_AURA_WM_SHELL_AURA_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/aura/wm_lookup_aura.h" 11 #include "ash/aura/wm_lookup_aura.h"
12 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
13 #include "ash/display/window_tree_host_manager.h" 13 #include "ash/display/window_tree_host_manager.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "ui/wm/public/activation_change_observer.h" 16 #include "ui/wm/public/activation_change_observer.h"
17 17
18 namespace ash { 18 namespace ash {
19 19
20 class PointerWatcherAdapter;
21
20 class ASH_EXPORT WmShellAura : public WmShell, 22 class ASH_EXPORT WmShellAura : public WmShell,
21 public aura::client::ActivationChangeObserver, 23 public aura::client::ActivationChangeObserver,
22 public WindowTreeHostManager::Observer { 24 public WindowTreeHostManager::Observer {
23 public: 25 public:
24 explicit WmShellAura(std::unique_ptr<ShellDelegate> shell_delegate); 26 explicit WmShellAura(std::unique_ptr<ShellDelegate> shell_delegate);
25 ~WmShellAura() override; 27 ~WmShellAura() override;
26 28
27 static WmShellAura* Get(); 29 static WmShellAura* Get();
28 30
31 void CreatePointerWatcherAdapter();
32
29 // WmShell: 33 // WmShell:
30 void Shutdown() override; 34 void Shutdown() override;
31 WmWindow* NewContainerWindow() override; 35 WmWindow* NewContainerWindow() override;
32 WmWindow* GetFocusedWindow() override; 36 WmWindow* GetFocusedWindow() override;
33 WmWindow* GetActiveWindow() override; 37 WmWindow* GetActiveWindow() override;
34 WmWindow* GetCaptureWindow() override; 38 WmWindow* GetCaptureWindow() override;
35 WmWindow* GetPrimaryRootWindow() override; 39 WmWindow* GetPrimaryRootWindow() override;
36 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; 40 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override;
37 const DisplayInfo& GetDisplayInfo(int64_t display_id) const override; 41 const DisplayInfo& GetDisplayInfo(int64_t display_id) const override;
38 bool IsActiveDisplayId(int64_t display_id) const override; 42 bool IsActiveDisplayId(int64_t display_id) const override;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 aura::Window* gained_active, 89 aura::Window* gained_active,
86 aura::Window* lost_active) override; 90 aura::Window* lost_active) override;
87 void OnAttemptToReactivateWindow(aura::Window* request_active, 91 void OnAttemptToReactivateWindow(aura::Window* request_active,
88 aura::Window* actual_active) override; 92 aura::Window* actual_active) override;
89 93
90 // WindowTreeHostManager::Observer: 94 // WindowTreeHostManager::Observer:
91 void OnDisplayConfigurationChanging() override; 95 void OnDisplayConfigurationChanging() override;
92 void OnDisplayConfigurationChanged() override; 96 void OnDisplayConfigurationChanged() override;
93 97
94 WmLookupAura wm_lookup_; 98 WmLookupAura wm_lookup_;
99 std::unique_ptr<PointerWatcherAdapter> pointer_watcher_adapter_;
100
95 bool added_activation_observer_ = false; 101 bool added_activation_observer_ = false;
96 base::ObserverList<WmActivationObserver> activation_observers_; 102 base::ObserverList<WmActivationObserver> activation_observers_;
97 103
98 bool added_display_observer_ = false; 104 bool added_display_observer_ = false;
99 base::ObserverList<WmDisplayObserver> display_observers_; 105 base::ObserverList<WmDisplayObserver> display_observers_;
100 106
101 DISALLOW_COPY_AND_ASSIGN(WmShellAura); 107 DISALLOW_COPY_AND_ASSIGN(WmShellAura);
102 }; 108 };
103 109
104 } // namespace ash 110 } // namespace ash
105 111
106 #endif // ASH_AURA_WM_SHELL_AURA_H_ 112 #endif // ASH_AURA_WM_SHELL_AURA_H_
OLDNEW
« no previous file with comments | « ash/aura/pointer_watcher_adapter_unittest.cc ('k') | ash/aura/wm_shell_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698