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

Unified Diff: ash/wm/toplevel_window_event_handler.cc

Issue 2494713003: Reenable Tabdragging tests failing because of IsWindowPositionManaged() (Closed)
Patch Set: moving to ash Created 4 years, 1 month 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 | « no previous file | chrome/browser/ui/views/tabs/tab_drag_controller.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.cc
diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc
index 5c4d9578433bf66b9d6efe8f5758529c7ee49e4c..b9a3f06e6abc77c7456a8432bf61315f82b5d737 100644
--- a/ash/wm/toplevel_window_event_handler.cc
+++ b/ash/wm/toplevel_window_event_handler.cc
@@ -5,7 +5,9 @@
#include "ash/wm/toplevel_window_event_handler.h"
#include "ash/aura/wm_window_aura.h"
+#include "ash/common/wm/window_state.h"
#include "ash/shell.h"
+#include "ash/wm/window_state_aura.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "ui/aura/client/cursor_client.h"
@@ -87,8 +89,16 @@ aura::client::WindowMoveResult ToplevelWindowEventHandler::RunMoveLoop(
base::MessageLoop* loop = base::MessageLoop::current();
base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
+ // Disable window position auto management while dragging and restore it
+ // aftrewards.
+ wm::WindowState* window_state = wm::GetWindowState(source);
+ const bool window_position_managed = window_state->window_position_managed();
+ window_state->set_window_position_managed(false);
sky 2016/11/28 18:30:42 How about adding test coverage of this to ash?
afakhry 2016/11/28 19:22:29 Done. Please check if what I added is enough or mo
+
run_loop.Run();
+ window_state->set_window_position_managed(window_position_managed);
sky 2016/11/28 18:30:42 I think you should assume that if 'this' has been
afakhry 2016/11/28 19:22:29 Done.
+
if (!weak_ptr)
return aura::client::MOVE_CANCELED;
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_drag_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698