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

Unified Diff: ash/wm/toplevel_window_event_filter.h

Issue 10909043: Cancel drag if display configuration changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix, adjust test screen size Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/toplevel_window_event_filter.h
diff --git a/ash/wm/toplevel_window_event_filter.h b/ash/wm/toplevel_window_event_filter.h
index 5b5710c3cf36c1191d1259dce07fd3f9091160c8..4be6c6ceb8b7e45cafcaef5c29a00cb982ba2b7b 100644
--- a/ash/wm/toplevel_window_event_filter.h
+++ b/ash/wm/toplevel_window_event_filter.h
@@ -8,6 +8,7 @@
#include <set>
#include "ash/ash_export.h"
+#include "ash/display/display_controller.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
@@ -30,7 +31,8 @@ class WindowResizer;
class ASH_EXPORT ToplevelWindowEventFilter
: public aura::EventFilter,
- public aura::client::WindowMoveClient {
+ public aura::client::WindowMoveClient,
+ public DisplayController::Observer {
public:
explicit ToplevelWindowEventFilter(aura::Window* owner);
virtual ~ToplevelWindowEventFilter();
@@ -54,10 +56,14 @@ class ASH_EXPORT ToplevelWindowEventFilter
ui::GestureEvent* event) OVERRIDE;
// Overridden form aura::client::WindowMoveClient:
- virtual void RunMoveLoop(aura::Window* source,
- const gfx::Point& drag_offset) OVERRIDE;
+ virtual aura::client::WindowMoveResult RunMoveLoop(
+ aura::Window* source,
+ const gfx::Point& drag_offset) OVERRIDE;
virtual void EndMoveLoop() OVERRIDE;
+ // Overridden form ash::DisplayController::Observer:
+ virtual void OnDisplayConfigurationChanging() OVERRIDE;
+
protected:
// Creates a new WindowResizer.
virtual WindowResizer* CreateWindowResizer(aura::Window* window,
@@ -97,6 +103,10 @@ class ASH_EXPORT ToplevelWindowEventFilter
// Are we running a nested message loop from RunMoveLoop().
bool in_move_loop_;
+ // Was the move operation cancelled? Used only when the nested loop
+ // is used to move a window.
+ bool move_cancelled_;
+
// Is a gesture-resize in progress?
bool in_gesture_resize_;

Powered by Google App Engine
This is Rietveld 408576698