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

Unified Diff: ash/wm/toplevel_window_event_handler.h

Issue 10909043: Cancel drag if display configuration changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « ash/ui_controls_ash.cc ('k') | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/toplevel_window_event_handler.h
diff --git a/ash/wm/toplevel_window_event_handler.h b/ash/wm/toplevel_window_event_handler.h
index 64ab70d22b81c56e4bbe0d8d92d6aa00c1ed014a..e8025b7269caaf8964c640b9cb2aa8ed7ce1b2f7 100644
--- a/ash/wm/toplevel_window_event_handler.h
+++ b/ash/wm/toplevel_window_event_handler.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 ToplevelWindowEventHandler
: public ui::EventHandler,
- public aura::client::WindowMoveClient {
+ public aura::client::WindowMoveClient,
+ public DisplayController::Observer {
public:
explicit ToplevelWindowEventHandler(aura::Window* owner);
virtual ~ToplevelWindowEventHandler();
@@ -43,10 +45,14 @@ class ASH_EXPORT ToplevelWindowEventHandler
virtual ui::EventResult OnGestureEvent(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,
@@ -86,6 +92,10 @@ class ASH_EXPORT ToplevelWindowEventHandler
// 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_;
« no previous file with comments | « ash/ui_controls_ash.cc ('k') | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698