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

Side by Side Diff: ash/wm/panels/panel_window_resizer_unittest.cc

Issue 15008002: Make touch-resizing windows to screen edge possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjust unit tests with final behavior Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/panels/panel_window_resizer.cc ('k') | ash/wm/toplevel_window_event_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/panels/panel_window_resizer.h" 5 #include "ash/wm/panels/panel_window_resizer.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/launcher/launcher_model.h" 8 #include "ash/launcher/launcher_model.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 layout_manager()); 71 layout_manager());
72 manager->Relayout(); 72 manager->Relayout();
73 return window; 73 return window;
74 } 74 }
75 75
76 static PanelWindowResizer* CreatePanelWindowResizer( 76 static PanelWindowResizer* CreatePanelWindowResizer(
77 aura::Window* window, 77 aura::Window* window,
78 const gfx::Point& point_in_parent, 78 const gfx::Point& point_in_parent,
79 int window_component) { 79 int window_component) {
80 return static_cast<PanelWindowResizer*>(CreateWindowResizer( 80 return static_cast<PanelWindowResizer*>(CreateWindowResizer(
81 window, point_in_parent, window_component).release()); 81 window, point_in_parent, window_component,
82 aura::client::WINDOW_MOVE_SOURCE_MOUSE).release());
82 } 83 }
83 84
84 void DragStart(aura::Window* window) { 85 void DragStart(aura::Window* window) {
85 resizer_.reset(CreatePanelWindowResizer(window, window->bounds().origin(), 86 resizer_.reset(CreatePanelWindowResizer(window, window->bounds().origin(),
86 HTCAPTION)); 87 HTCAPTION));
87 ASSERT_TRUE(resizer_.get()); 88 ASSERT_TRUE(resizer_.get());
88 } 89 }
89 90
90 void DragMove(int dx, int dy) { 91 void DragMove(int dx, int dy) {
91 resizer_->Drag(CalculateDragPoint(*resizer_, dx, dy), 0); 92 resizer_->Drag(CalculateDragPoint(*resizer_, dx, dy), 0);
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 ash::Shell* shell = ash::Shell::GetInstance(); 449 ash::Shell* shell = ash::Shell::GetInstance();
449 shell->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, shell->GetPrimaryRootWindow()); 450 shell->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, shell->GetPrimaryRootWindow());
450 DragAlongShelfReorder(0, -1); 451 DragAlongShelfReorder(0, -1);
451 } 452 }
452 453
453 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest, 454 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest,
454 testing::Bool()); 455 testing::Bool());
455 456
456 } // namespace internal 457 } // namespace internal
457 } // namespace ash 458 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_window_resizer.cc ('k') | ash/wm/toplevel_window_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698