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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_event_blocker.h

Issue 269633005: Only block internal touchpad and allow external mice to continue working in maximize mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_EVENT_BLOCKER_H_ 5 #ifndef ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_EVENT_BLOCKER_H_
6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_EVENT_BLOCKER_H_ 6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_EVENT_BLOCKER_H_
7 7
8 #include <set>
9
8 #include "ash/shell_observer.h" 10 #include "ash/shell_observer.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
11 #include "ui/aura/scoped_window_targeter.h" 14 #include "ui/aura/scoped_window_targeter.h"
12 15
13 namespace aura { 16 namespace aura {
14 class Window; 17 class Window;
15 } // namespace aura 18 } // namespace aura
16 19
17 namespace ash { 20 namespace ash {
18 21
22 class InternalInputDeviceList;
23 class MaximizeModeControllerTest;
24
19 // A class which blocks mouse and keyboard events while instantiated by 25 // A class which blocks mouse and keyboard events while instantiated by
20 // replacing the root window event targeter. 26 // replacing the root window event targeter.
21 class MaximizeModeEventBlocker : public ShellObserver { 27 class MaximizeModeEventBlocker : public ShellObserver {
22 public: 28 public:
23 MaximizeModeEventBlocker(); 29 MaximizeModeEventBlocker();
24 virtual ~MaximizeModeEventBlocker(); 30 virtual ~MaximizeModeEventBlocker();
25 31
32 InternalInputDeviceList* internal_devices() {
33 return internal_devices_.get();
34 }
35
26 // ShellObserver: 36 // ShellObserver:
27 virtual void OnRootWindowAdded(aura::Window* root_window) OVERRIDE; 37 virtual void OnRootWindowAdded(aura::Window* root_window) OVERRIDE;
28 38
29 private: 39 private:
40 friend class MaximizeModeControllerTest;
41
30 // Adds an event targeter on |root_window| to block mouse and keyboard events. 42 // Adds an event targeter on |root_window| to block mouse and keyboard events.
31 void AddEventTargeterOn(aura::Window* root_window); 43 void AddEventTargeterOn(aura::Window* root_window);
32 44
33 ScopedVector<aura::ScopedWindowTargeter> targeters_; 45 ScopedVector<aura::ScopedWindowTargeter> targeters_;
46 scoped_ptr<InternalInputDeviceList> internal_devices_;
34 47
35 DISALLOW_COPY_AND_ASSIGN(MaximizeModeEventBlocker); 48 DISALLOW_COPY_AND_ASSIGN(MaximizeModeEventBlocker);
36 }; 49 };
37 50
38 } // namespace ash 51 } // namespace ash
39 52
40 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_EVENT_BLOCKER_H_ 53 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_EVENT_BLOCKER_H_
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller_unittest.cc ('k') | ash/wm/maximize_mode/maximize_mode_event_blocker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698