summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-28 22:26:44 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-28 22:26:44 +0000
commit45cbc1d3c72c9cb7f0b2d5249ca59c867cb7aab4 (patch)
treee18be973ff215fff7ff294a0ae3416e0a995e0f9
parentc9cc9441ec59bbba1eb942d03fc45553b7fb4a41 (diff)
downloadchromium_src-45cbc1d3c72c9cb7f0b2d5249ca59c867cb7aab4.zip
chromium_src-45cbc1d3c72c9cb7f0b2d5249ca59c867cb7aab4.tar.gz
chromium_src-45cbc1d3c72c9cb7f0b2d5249ca59c867cb7aab4.tar.bz2
Remove unused parameter in ash::WindowResizer::CompleteDrag()
BUG=None TEST=None TBR=oshima Review URL: https://codereview.chromium.org/122093003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242694 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/wm/default_window_resizer.cc2
-rw-r--r--ash/wm/default_window_resizer.h2
-rw-r--r--ash/wm/dock/docked_window_layout_manager_unittest.cc2
-rw-r--r--ash/wm/dock/docked_window_resizer.cc4
-rw-r--r--ash/wm/dock/docked_window_resizer.h2
-rw-r--r--ash/wm/dock/docked_window_resizer_unittest.cc2
-rw-r--r--ash/wm/drag_window_resizer.cc4
-rw-r--r--ash/wm/drag_window_resizer.h2
-rw-r--r--ash/wm/drag_window_resizer_unittest.cc40
-rw-r--r--ash/wm/gestures/two_finger_drag_handler.cc6
-rw-r--r--ash/wm/panels/panel_window_resizer.cc4
-rw-r--r--ash/wm/panels/panel_window_resizer.h2
-rw-r--r--ash/wm/panels/panel_window_resizer_unittest.cc2
-rw-r--r--ash/wm/solo_window_tracker_unittest.cc4
-rw-r--r--ash/wm/toplevel_window_event_handler.cc26
-rw-r--r--ash/wm/toplevel_window_event_handler.h2
-rw-r--r--ash/wm/window_resizer.h2
-rw-r--r--ash/wm/workspace/multi_window_resize_controller.cc6
-rw-r--r--ash/wm/workspace/multi_window_resize_controller.h2
-rw-r--r--ash/wm/workspace/workspace_window_resizer.cc2
-rw-r--r--ash/wm/workspace/workspace_window_resizer.h2
-rw-r--r--ash/wm/workspace/workspace_window_resizer_unittest.cc28
22 files changed, 67 insertions, 81 deletions
diff --git a/ash/wm/default_window_resizer.cc b/ash/wm/default_window_resizer.cc
index 41bc1fd..97dbbe7 100644
--- a/ash/wm/default_window_resizer.cc
+++ b/ash/wm/default_window_resizer.cc
@@ -40,7 +40,7 @@ void DefaultWindowResizer::Drag(const gfx::Point& location, int event_flags) {
}
}
-void DefaultWindowResizer::CompleteDrag(int event_flags) {
+void DefaultWindowResizer::CompleteDrag() {
}
void DefaultWindowResizer::RevertDrag() {
diff --git a/ash/wm/default_window_resizer.h b/ash/wm/default_window_resizer.h
index 621acd3..f459d52 100644
--- a/ash/wm/default_window_resizer.h
+++ b/ash/wm/default_window_resizer.h
@@ -34,7 +34,7 @@ class ASH_EXPORT DefaultWindowResizer : public WindowResizer {
// WindowResizer:
virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
- virtual void CompleteDrag(int event_flags) OVERRIDE;
+ virtual void CompleteDrag() OVERRIDE;
virtual void RevertDrag() OVERRIDE;
virtual aura::Window* GetTarget() OVERRIDE;
virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
diff --git a/ash/wm/dock/docked_window_layout_manager_unittest.cc b/ash/wm/dock/docked_window_layout_manager_unittest.cc
index 8ac74db..7d63296 100644
--- a/ash/wm/dock/docked_window_layout_manager_unittest.cc
+++ b/ash/wm/dock/docked_window_layout_manager_unittest.cc
@@ -137,7 +137,7 @@ class DockedWindowLayoutManagerTest
}
void DragEnd() {
- resizer_->CompleteDrag(0);
+ resizer_->CompleteDrag();
resizer_.reset();
}
diff --git a/ash/wm/dock/docked_window_resizer.cc b/ash/wm/dock/docked_window_resizer.cc
index 7cf2081..8c67b55 100644
--- a/ash/wm/dock/docked_window_resizer.cc
+++ b/ash/wm/dock/docked_window_resizer.cc
@@ -115,9 +115,9 @@ void DockedWindowResizer::Drag(const gfx::Point& location, int event_flags) {
was_bounds_changed_by_user_ = false;
}
-void DockedWindowResizer::CompleteDrag(int event_flags) {
+void DockedWindowResizer::CompleteDrag() {
// The root window can change when dragging into a different screen.
- next_window_resizer_->CompleteDrag(event_flags);
+ next_window_resizer_->CompleteDrag();
FinishedDragging();
}
diff --git a/ash/wm/dock/docked_window_resizer.h b/ash/wm/dock/docked_window_resizer.h
index 929259e..75c6071 100644
--- a/ash/wm/dock/docked_window_resizer.h
+++ b/ash/wm/dock/docked_window_resizer.h
@@ -42,7 +42,7 @@ class ASH_EXPORT DockedWindowResizer : public WindowResizer {
// WindowResizer:
virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
- virtual void CompleteDrag(int event_flags) OVERRIDE;
+ virtual void CompleteDrag() OVERRIDE;
virtual void RevertDrag() OVERRIDE;
virtual aura::Window* GetTarget() OVERRIDE;
virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc
index 5daad1b..ac0b5b7 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -156,7 +156,7 @@ class DockedWindowResizerTest
}
void DragEnd() {
- resizer_->CompleteDrag(0);
+ resizer_->CompleteDrag();
resizer_.reset();
}
diff --git a/ash/wm/drag_window_resizer.cc b/ash/wm/drag_window_resizer.cc
index b2644d4..5b74fcb 100644
--- a/ash/wm/drag_window_resizer.cc
+++ b/ash/wm/drag_window_resizer.cc
@@ -106,11 +106,11 @@ void DragWindowResizer::Drag(const gfx::Point& location, int event_flags) {
}
}
-void DragWindowResizer::CompleteDrag(int event_flags) {
+void DragWindowResizer::CompleteDrag() {
if (TryDraggingToNewUser())
return;
- next_window_resizer_->CompleteDrag(event_flags);
+ next_window_resizer_->CompleteDrag();
GetTarget()->layer()->SetOpacity(details_.initial_opacity);
drag_window_controller_.reset();
diff --git a/ash/wm/drag_window_resizer.h b/ash/wm/drag_window_resizer.h
index f88e077..108bfed 100644
--- a/ash/wm/drag_window_resizer.h
+++ b/ash/wm/drag_window_resizer.h
@@ -34,7 +34,7 @@ class ASH_EXPORT DragWindowResizer : public WindowResizer {
// WindowResizer:
virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
- virtual void CompleteDrag(int event_flags) OVERRIDE;
+ virtual void CompleteDrag() OVERRIDE;
virtual void RevertDrag() OVERRIDE;
virtual aura::Window* GetTarget() OVERRIDE;
virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
diff --git a/ash/wm/drag_window_resizer_unittest.cc b/ash/wm/drag_window_resizer_unittest.cc
index 8980640ad..c2bd1df 100644
--- a/ash/wm/drag_window_resizer_unittest.cc
+++ b/ash/wm/drag_window_resizer_unittest.cc
@@ -177,7 +177,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
// Drag the pointer to the right. Once it reaches the right edge of the
// primary display, it warps to the secondary.
resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
// The whole window is on the secondary display now. The parent should be
// changed.
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
@@ -195,7 +195,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
resizer->Drag(CalculateDragPoint(*resizer, 795, 10), 0);
// Window should be adjusted for minimum visibility (10px) during the drag.
EXPECT_EQ("790,10 50x60", window_->bounds().ToString());
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
// Since the pointer is still on the primary root window, the parent should
// not be changed.
// Window origin should be adjusted for minimum visibility (10px).
@@ -213,7 +213,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
window_.get(), gfx::Point(49, 0), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 751, 10), ui::EF_CONTROL_DOWN);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
// Since the pointer is on the secondary, the parent should be changed
// even though only small fraction of the window is within the secondary
// root window's bounds.
@@ -235,7 +235,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
window_.get(), gfx::Point(699, 0), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 101, 10), ui::EF_CONTROL_DOWN);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
// Window size should be adjusted to fit to the work area
EXPECT_EQ("400x253", window_->bounds().size().ToString());
@@ -265,7 +265,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 799, 10), ui::EF_CONTROL_DOWN);
resizer->Drag(CalculateDragPoint(*resizer, 850, 10), ui::EF_CONTROL_DOWN);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
// Window size should be adjusted to fit to the work area
EXPECT_EQ("400x253", window_->bounds().size().ToString());
@@ -310,7 +310,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysActiveRoot) {
// Drag the pointer to the right. Once it reaches the right edge of the
// primary display, it warps to the secondary.
resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
// The whole window is on the secondary display now. The parent should be
// changed.
EXPECT_EQ(root_windows[1], window->GetRootWindow());
@@ -338,7 +338,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysRightToLeft) {
ASSERT_TRUE(resizer.get());
// Move the mouse near the right edge, (798, 0), of the primary display.
resizer->Drag(CalculateDragPoint(*resizer, -2, 0), ui::EF_CONTROL_DOWN);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
// Window origin should be adjusted for minimum visibility (10px).
int expected_x = 800 - 10;
@@ -402,7 +402,7 @@ TEST_F(DragWindowResizerTest, DragWindowController) {
EXPECT_GT(1.0f, window_->layer()->opacity());
EXPECT_FLOAT_EQ(1.0f, drag_layer->opacity());
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
}
@@ -443,7 +443,7 @@ TEST_F(DragWindowResizerTest, WarpMousePointer) {
// While dragging a window, warp should be allowed.
EXPECT_EQ(MouseCursorEventFilter::WARP_DRAG,
event_filter->mouse_warp_mode_);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
}
EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
event_filter->mouse_warp_mode_);
@@ -464,7 +464,7 @@ TEST_F(DragWindowResizerTest, WarpMousePointer) {
// While resizing a window, warp should NOT be allowed.
EXPECT_EQ(MouseCursorEventFilter::WARP_NONE,
event_filter->mouse_warp_mode_);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
}
EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
event_filter->mouse_warp_mode_);
@@ -508,7 +508,7 @@ TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) {
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
WarpMouseCursorIfNecessary(root_windows[0], gfx::Point(399, 200));
EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
}
@@ -527,7 +527,7 @@ TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) {
resizer->Drag(CalculateDragPoint(*resizer, -200, 200), 0);
WarpMouseCursorIfNecessary(root_windows[1], gfx::Point(400, 200));
EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
}
}
@@ -556,7 +556,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
}
// Always on top window can be moved across display.
@@ -571,7 +571,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
}
// System modal window can be moved across display.
@@ -586,7 +586,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
}
// Transient window cannot be moved across display.
@@ -602,7 +602,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
EXPECT_FALSE(WarpMouseCursorIfNecessary(
root_windows[0],
gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
}
// The parent of transient window can be moved across display.
@@ -617,7 +617,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
}
// Panel window can be moved across display.
@@ -632,7 +632,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
}
}
@@ -675,7 +675,7 @@ TEST_F(DragWindowResizerTest, DragToOtherDesktopOpacity) {
resizer->Drag(center, 0);
EXPECT_NE(1.0, window->layer()->opacity());
EXPECT_EQ(0, session_delegate->num_transfer_to_desktop_of_user_calls());
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(1.0, window->layer()->opacity());
EXPECT_EQ(1, session_delegate->num_transfer_to_desktop_of_user_calls());
EXPECT_EQ(initial_bounds.ToString(), window->bounds().ToString());
@@ -715,7 +715,7 @@ TEST_F(DragWindowResizerTest, DragToOtherDesktopOpacity) {
EXPECT_NE(1.0, window->layer()->opacity());
resizer->Drag(gfx::Point(), 0);
EXPECT_EQ(1.0, window->layer()->opacity());
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(1, session_delegate->num_transfer_to_desktop_of_user_calls());
EXPECT_NE(initial_bounds.ToString(), window->bounds().ToString());
}
diff --git a/ash/wm/gestures/two_finger_drag_handler.cc b/ash/wm/gestures/two_finger_drag_handler.cc
index b1d57fe..47e8a40 100644
--- a/ash/wm/gestures/two_finger_drag_handler.cc
+++ b/ash/wm/gestures/two_finger_drag_handler.cc
@@ -129,7 +129,7 @@ bool TwoFingerDragHandler::ProcessGestureEvent(aura::Window* target,
case ui::ET_GESTURE_BEGIN:
if (event.details().touch_points() > 2) {
if (window_resizer_)
- window_resizer_->CompleteDrag(event.flags());
+ window_resizer_->CompleteDrag();
Reset(target);
}
return false;
@@ -143,7 +143,7 @@ bool TwoFingerDragHandler::ProcessGestureEvent(aura::Window* target,
// For a swipe, the window either maximizes, minimizes, or snaps. In this
// case, complete the drag, and do the appropriate action.
if (window_resizer_)
- window_resizer_->CompleteDrag(event.flags());
+ window_resizer_->CompleteDrag();
Reset(target);
if (event.details().swipe_up()) {
if (window_state->CanMaximize())
@@ -166,7 +166,7 @@ bool TwoFingerDragHandler::ProcessGestureEvent(aura::Window* target,
case ui::ET_GESTURE_PINCH_END:
if (window_resizer_)
- window_resizer_->CompleteDrag(event.flags());
+ window_resizer_->CompleteDrag();
Reset(target);
return true;
diff --git a/ash/wm/panels/panel_window_resizer.cc b/ash/wm/panels/panel_window_resizer.cc
index 689f635..cc5a315 100644
--- a/ash/wm/panels/panel_window_resizer.cc
+++ b/ash/wm/panels/panel_window_resizer.cc
@@ -104,9 +104,9 @@ void PanelWindowResizer::Drag(const gfx::Point& location, int event_flags) {
}
}
-void PanelWindowResizer::CompleteDrag(int event_flags) {
+void PanelWindowResizer::CompleteDrag() {
// The root window can change when dragging into a different screen.
- next_window_resizer_->CompleteDrag(event_flags);
+ next_window_resizer_->CompleteDrag();
FinishDragging();
}
diff --git a/ash/wm/panels/panel_window_resizer.h b/ash/wm/panels/panel_window_resizer.h
index df3d8c4..9a1b69c 100644
--- a/ash/wm/panels/panel_window_resizer.h
+++ b/ash/wm/panels/panel_window_resizer.h
@@ -34,7 +34,7 @@ class ASH_EXPORT PanelWindowResizer : public WindowResizer {
// WindowResizer:
virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
- virtual void CompleteDrag(int event_flags) OVERRIDE;
+ virtual void CompleteDrag() OVERRIDE;
virtual void RevertDrag() OVERRIDE;
virtual aura::Window* GetTarget() OVERRIDE;
virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc
index 4c70c83..68477ab 100644
--- a/ash/wm/panels/panel_window_resizer_unittest.cc
+++ b/ash/wm/panels/panel_window_resizer_unittest.cc
@@ -86,7 +86,7 @@ class PanelWindowResizerTest : public test::AshTestBase {
}
void DragEnd() {
- resizer_->CompleteDrag(0);
+ resizer_->CompleteDrag();
resizer_.reset();
}
diff --git a/ash/wm/solo_window_tracker_unittest.cc b/ash/wm/solo_window_tracker_unittest.cc
index c3629b1..3174690 100644
--- a/ash/wm/solo_window_tracker_unittest.cc
+++ b/ash/wm/solo_window_tracker_unittest.cc
@@ -110,7 +110,7 @@ class SoloWindowTrackerTest : public test::AshTestBase {
HTCAPTION,
aura::client::WINDOW_MOVE_SOURCE_MOUSE));
resizer->Drag(drag_to, 0);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(internal::kShellWindowId_DockedContainer,
window->parent()->id());
}
@@ -126,7 +126,7 @@ class SoloWindowTrackerTest : public test::AshTestBase {
HTCAPTION,
aura::client::WINDOW_MOVE_SOURCE_MOUSE));
resizer->Drag(drag_to, 0);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_NE(internal::kShellWindowId_DockedContainer,
window->parent()->id());
}
diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc
index 933c947..e7d4bac 100644
--- a/ash/wm/toplevel_window_event_handler.cc
+++ b/ash/wm/toplevel_window_event_handler.cc
@@ -108,7 +108,7 @@ void ToplevelWindowEventHandler::ScopedWindowResizer::OnWindowHierarchyChanging(
state->set_continue_drag_after_reparent(false);
AddHandlers(params.new_parent);
} else {
- handler_->CompleteDrag(DRAG_COMPLETE, 0);
+ handler_->CompleteDrag(DRAG_COMPLETE);
}
}
@@ -116,7 +116,7 @@ void ToplevelWindowEventHandler::ScopedWindowResizer::OnWindowShowTypeChanged(
wm::WindowState* window_state,
wm::WindowShowType old) {
if (!window_state->IsNormalShowState())
- handler_->CompleteDrag(DRAG_COMPLETE, 0);
+ handler_->CompleteDrag(DRAG_COMPLETE);
}
void ToplevelWindowEventHandler::ScopedWindowResizer::OnWindowDestroying(
@@ -167,7 +167,7 @@ ToplevelWindowEventHandler::~ToplevelWindowEventHandler() {
void ToplevelWindowEventHandler::OnKeyEvent(ui::KeyEvent* event) {
if (window_resizer_.get() && event->type() == ui::ET_KEY_PRESSED &&
event->key_code() == ui::VKEY_ESCAPE) {
- CompleteDrag(DRAG_REVERT, event->flags());
+ CompleteDrag(DRAG_REVERT);
}
}
@@ -264,11 +264,11 @@ void ToplevelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
return;
}
case ui::ET_GESTURE_SCROLL_END:
- CompleteDrag(DRAG_COMPLETE, event->flags());
+ CompleteDrag(DRAG_COMPLETE);
event->StopPropagation();
return;
case ui::ET_SCROLL_FLING_START: {
- CompleteDrag(DRAG_COMPLETE, event->flags());
+ CompleteDrag(DRAG_COMPLETE);
int component =
target->delegate()->GetNonClientComponent(event->location());
@@ -343,11 +343,11 @@ aura::client::WindowMoveResult ToplevelWindowEventHandler::RunMoveLoop(
void ToplevelWindowEventHandler::EndMoveLoop() {
if (in_move_loop_)
- CompleteDrag(DRAG_REVERT, 0);
+ CompleteDrag(DRAG_REVERT);
}
void ToplevelWindowEventHandler::OnDisplayConfigurationChanging() {
- CompleteDrag(DRAG_REVERT, 0);
+ CompleteDrag(DRAG_REVERT);
}
void ToplevelWindowEventHandler::AttemptToStartDrag(
@@ -356,7 +356,7 @@ void ToplevelWindowEventHandler::AttemptToStartDrag(
int window_component,
aura::client::WindowMoveSource source) {
if (window_resizer_.get())
- CompleteDrag(DRAG_REVERT, 0);
+ CompleteDrag(DRAG_REVERT);
WindowResizer* resizer = CreateWindowResizer(window, point_in_parent,
window_component, source).release();
if (!resizer)
@@ -368,12 +368,11 @@ void ToplevelWindowEventHandler::AttemptToStartDrag(
in_gesture_drag_ = (source == aura::client::WINDOW_MOVE_SOURCE_TOUCH);
}
-void ToplevelWindowEventHandler::CompleteDrag(DragCompletionStatus status,
- int event_flags) {
+void ToplevelWindowEventHandler::CompleteDrag(DragCompletionStatus status) {
scoped_ptr<ScopedWindowResizer> resizer(window_resizer_.release());
if (resizer) {
if (status == DRAG_COMPLETE)
- resizer->resizer()->CompleteDrag(event_flags);
+ resizer->resizer()->CompleteDrag();
else
resizer->resizer()->RevertDrag();
}
@@ -418,8 +417,7 @@ void ToplevelWindowEventHandler::HandleMouseReleased(
return;
CompleteDrag(event->type() == ui::ET_MOUSE_RELEASED ?
- DRAG_COMPLETE : DRAG_REVERT,
- event->flags());
+ DRAG_COMPLETE : DRAG_REVERT);
// Completing the drag may result in hiding the window. If this happens
// return true so no other handlers/observers see the event. Otherwise
// they see the event on a hidden window.
@@ -531,7 +529,7 @@ void ToplevelWindowEventHandler::ResizerWindowDestroyed() {
// Instead we destroy the resizer.
window_resizer_.reset();
- CompleteDrag(DRAG_REVERT, 0);
+ CompleteDrag(DRAG_REVERT);
}
} // namespace ash
diff --git a/ash/wm/toplevel_window_event_handler.h b/ash/wm/toplevel_window_event_handler.h
index 3d4c629..7535754 100644
--- a/ash/wm/toplevel_window_event_handler.h
+++ b/ash/wm/toplevel_window_event_handler.h
@@ -70,7 +70,7 @@ class ASH_EXPORT ToplevelWindowEventHandler
aura::client::WindowMoveSource source);
// Finishes the drag.
- void CompleteDrag(DragCompletionStatus status, int event_flags);
+ void CompleteDrag(DragCompletionStatus status);
void HandleMousePressed(aura::Window* target, ui::MouseEvent* event);
void HandleMouseReleased(aura::Window* target, ui::MouseEvent* event);
diff --git a/ash/wm/window_resizer.h b/ash/wm/window_resizer.h
index 29479b3..09f8ea2 100644
--- a/ash/wm/window_resizer.h
+++ b/ash/wm/window_resizer.h
@@ -47,7 +47,7 @@ class ASH_EXPORT WindowResizer {
virtual void Drag(const gfx::Point& location, int event_flags) = 0;
// Invoked to complete the drag.
- virtual void CompleteDrag(int event_flags) = 0;
+ virtual void CompleteDrag() = 0;
// Reverts the drag.
virtual void RevertDrag() = 0;
diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc
index 597acbf..573824e 100644
--- a/ash/wm/workspace/multi_window_resize_controller.cc
+++ b/ash/wm/workspace/multi_window_resize_controller.cc
@@ -92,7 +92,7 @@ class MultiWindowResizeController::ResizeView : public views::View {
return true;
}
virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE {
- controller_->CompleteResize(event.flags());
+ controller_->CompleteResize();
}
virtual void OnMouseCaptureLost() OVERRIDE {
controller_->CancelResize();
@@ -458,8 +458,8 @@ void MultiWindowResizeController::Resize(const gfx::Point& location_in_screen,
resize_widget_->SetBounds(bounds);
}
-void MultiWindowResizeController::CompleteResize(int event_flags) {
- window_resizer_->CompleteDrag(event_flags);
+void MultiWindowResizeController::CompleteResize() {
+ window_resizer_->CompleteDrag();
window_resizer_.reset();
// Mouse may still be over resizer, if not hide.
diff --git a/ash/wm/workspace/multi_window_resize_controller.h b/ash/wm/workspace/multi_window_resize_controller.h
index 02eeb25..6dd342e 100644
--- a/ash/wm/workspace/multi_window_resize_controller.h
+++ b/ash/wm/workspace/multi_window_resize_controller.h
@@ -134,7 +134,7 @@ class ASH_EXPORT MultiWindowResizeController :
void Resize(const gfx::Point& location_in_screen, int event_flags);
// Completes the resize.
- void CompleteResize(int event_flags);
+ void CompleteResize();
// Cancels the resize.
void CancelResize();
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index 70bc382..9d64fb2 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -430,7 +430,7 @@ void WorkspaceWindowResizer::Drag(const gfx::Point& location_in_parent,
}
}
-void WorkspaceWindowResizer::CompleteDrag(int event_flags) {
+void WorkspaceWindowResizer::CompleteDrag() {
window_state()->set_bounds_changed_by_user(true);
snap_phantom_window_controller_.reset();
if (!did_move_or_resize_ || details_.window_component != HTCAPTION)
diff --git a/ash/wm/workspace/workspace_window_resizer.h b/ash/wm/workspace/workspace_window_resizer.h
index 015e96dd..c0b654e 100644
--- a/ash/wm/workspace/workspace_window_resizer.h
+++ b/ash/wm/workspace/workspace_window_resizer.h
@@ -64,7 +64,7 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
// WindowResizer:
virtual void Drag(const gfx::Point& location_in_parent,
int event_flags) OVERRIDE;
- virtual void CompleteDrag(int event_flags) OVERRIDE;
+ virtual void CompleteDrag() OVERRIDE;
virtual void RevertDrag() OVERRIDE;
virtual aura::Window* GetTarget() OVERRIDE;
virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index 16a45fc..5a71c82 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -616,7 +616,7 @@ TEST_F(WorkspaceWindowResizerTest, Edge) {
window_.get(), gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 0, 10), 0);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(expected_bounds.ToString(), window_->bounds().ToString());
ASSERT_TRUE(window_state->HasRestoreBounds());
@@ -633,7 +633,7 @@ TEST_F(WorkspaceWindowResizerTest, Edge) {
window_.get(), gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ(expected_bounds.ToString(), window_->bounds().ToString());
ASSERT_TRUE(window_state->HasRestoreBounds());
EXPECT_EQ("20,30 400x60",
@@ -663,7 +663,7 @@ TEST_F(WorkspaceWindowResizerTest, Edge) {
resizer->Drag(CalculateDragPoint(*resizer, 499, 0), 0);
int bottom =
ScreenAsh::GetDisplayWorkAreaBoundsInParent(window_.get()).bottom();
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
// With the resolution of 500x600 we will hit in this case the 50% screen
// size setting.
// TODO(varkha): Insets are updated because of http://crbug.com/292238
@@ -683,7 +683,7 @@ TEST_F(WorkspaceWindowResizerTest, NonResizableWindows) {
window_.get(), gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, -20, 0), 0);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ("0,30 50x60", window_->bounds().ToString());
}
@@ -819,7 +819,7 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) {
// on non-work area with kMinOnscreenHeight margin.
EXPECT_EQ("100," + base::IntToString(expected_y) + " 300x400",
window_->bounds().ToString());
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
}
{
@@ -832,7 +832,7 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) {
// The window can move to the secondary display beyond non-work area of
// the primary display.
EXPECT_EQ("100,700 300x400", window_->bounds().ToString());
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
}
}
@@ -1215,18 +1215,6 @@ TEST_F(WorkspaceWindowResizerTest, CtrlDragResizeToExactPosition) {
EXPECT_EQ("96,112 330x172", window_->bounds().ToString());
}
-TEST_F(WorkspaceWindowResizerTest, CtrlCompleteDragMoveToExactPosition) {
- window_->SetBounds(gfx::Rect(96, 112, 320, 160));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Ctrl + drag the window to new poistion by adding (10, 12) to its origin,
- // the window should move to the exact position.
- resizer->Drag(CalculateDragPoint(*resizer, 10, 12), 0);
- resizer->CompleteDrag(ui::EF_CONTROL_DOWN);
- EXPECT_EQ("106,124 320x160", window_->bounds().ToString());
-}
-
// Verifies that a dragged window will restore to its pre-maximized size.
TEST_F(WorkspaceWindowResizerTest, RestoreToPreMaximizeCoordinates) {
window_->SetBounds(gfx::Rect(0, 0, 1000, 1000));
@@ -1238,7 +1226,7 @@ TEST_F(WorkspaceWindowResizerTest, RestoreToPreMaximizeCoordinates) {
// Drag the window to new position by adding (10, 10) to original point,
// the window should get restored.
resizer->Drag(CalculateDragPoint(*resizer, 10, 10), 0);
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_EQ("10,10 320x160", window_->bounds().ToString());
// The restore rectangle should get cleared as well.
EXPECT_FALSE(window_state->HasRestoreBounds());
@@ -1468,7 +1456,7 @@ TEST_F(WorkspaceWindowResizerTest, CheckUserWindowManagedFlags) {
// Move it 100 to the bottom.
resizer->Drag(CalculateDragPoint(*resizer, 0, 100), 0);
EXPECT_EQ("0,150 400x200", window_->bounds().ToString());
- resizer->CompleteDrag(0);
+ resizer->CompleteDrag();
EXPECT_TRUE(wm::GetWindowState(window_.get())->bounds_changed_by_user());
}
}