| Index: ash/wm/maximize_mode/maximize_mode_event_blocker.h
|
| diff --git a/ash/wm/maximize_mode/maximize_mode_event_blocker.h b/ash/wm/maximize_mode/maximize_mode_event_blocker.h
|
| index 4f7fae7c32d918ed8638fa7042301f89538b767e..74ba108be1ac9535e0a965f983228a64bb90da4b 100644
|
| --- a/ash/wm/maximize_mode/maximize_mode_event_blocker.h
|
| +++ b/ash/wm/maximize_mode/maximize_mode_event_blocker.h
|
| @@ -7,42 +7,34 @@
|
|
|
| #include <set>
|
|
|
| -#include "ash/shell_observer.h"
|
| +#include "ash/ash_export.h"
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "base/memory/scoped_vector.h"
|
| -#include "ui/aura/scoped_window_targeter.h"
|
| -
|
| -namespace aura {
|
| -class Window;
|
| -} // namespace aura
|
| +#include "ui/events/platform/platform_event_filter.h"
|
| +#include "ui/gfx/point.h"
|
|
|
| namespace ash {
|
|
|
| class InternalInputDeviceList;
|
| -class MaximizeModeControllerTest;
|
| +class MaximizeModeEventBlockerX11Test;
|
|
|
| // A class which blocks mouse and keyboard events while instantiated by
|
| // replacing the root window event targeter.
|
| -class MaximizeModeEventBlocker : public ShellObserver {
|
| +class ASH_EXPORT MaximizeModeEventBlocker : public ui::PlatformEventFilter {
|
| public:
|
| MaximizeModeEventBlocker();
|
| virtual ~MaximizeModeEventBlocker();
|
|
|
| - InternalInputDeviceList* internal_devices() {
|
| - return internal_devices_.get();
|
| - }
|
| -
|
| - // ShellObserver:
|
| - virtual void OnRootWindowAdded(aura::Window* root_window) OVERRIDE;
|
| + // ui::PlatformEventFilter:
|
| + virtual bool ShouldDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
|
|
|
| private:
|
| - friend class MaximizeModeControllerTest;
|
| + friend class MaximizeModeEventBlockerX11Test;
|
|
|
| - // Adds an event targeter on |root_window| to block mouse and keyboard events.
|
| - void AddEventTargeterOn(aura::Window* root_window);
|
| + // The last known mouse location to lock the cursor in place to when events
|
| + // come from the internal touchpad.
|
| + gfx::Point last_mouse_location_;
|
|
|
| - ScopedVector<aura::ScopedWindowTargeter> targeters_;
|
| scoped_ptr<InternalInputDeviceList> internal_devices_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(MaximizeModeEventBlocker);
|
|
|