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

Side by Side Diff: ash/wm/panels/panel_window_resizer.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.h ('k') | ash/wm/panels/panel_window_resizer_unittest.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/launcher/launcher.h" 8 #include "ash/launcher/launcher.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/screen_ash.h" 10 #include "ash/screen_ash.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 PanelWindowResizer::~PanelWindowResizer() { 43 PanelWindowResizer::~PanelWindowResizer() {
44 if (destroyed_) 44 if (destroyed_)
45 *destroyed_ = true; 45 *destroyed_ = true;
46 } 46 }
47 47
48 // static 48 // static
49 PanelWindowResizer* 49 PanelWindowResizer*
50 PanelWindowResizer::Create(WindowResizer* next_window_resizer, 50 PanelWindowResizer::Create(WindowResizer* next_window_resizer,
51 aura::Window* window, 51 aura::Window* window,
52 const gfx::Point& location, 52 const gfx::Point& location,
53 int window_component) { 53 int window_component,
54 Details details(window, location, window_component); 54 aura::client::WindowMoveSource source) {
55 Details details(window, location, window_component, source);
55 return details.is_resizable ? 56 return details.is_resizable ?
56 new PanelWindowResizer(next_window_resizer, details) : NULL; 57 new PanelWindowResizer(next_window_resizer, details) : NULL;
57 } 58 }
58 59
59 void PanelWindowResizer::Drag(const gfx::Point& location, int event_flags) { 60 void PanelWindowResizer::Drag(const gfx::Point& location, int event_flags) {
60 bool destroyed = false; 61 bool destroyed = false;
61 if (!did_move_or_resize_) { 62 if (!did_move_or_resize_) {
62 did_move_or_resize_ = true; 63 did_move_or_resize_ = true;
63 StartedDragging(); 64 StartedDragging();
64 } 65 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 214 }
214 215
215 void PanelWindowResizer::UpdateLauncherPosition() { 216 void PanelWindowResizer::UpdateLauncherPosition() {
216 if (panel_container_) { 217 if (panel_container_) {
217 GetPanelLayoutManager(panel_container_)->launcher()-> 218 GetPanelLayoutManager(panel_container_)->launcher()->
218 UpdateIconPositionForWindow(GetTarget()); 219 UpdateIconPositionForWindow(GetTarget());
219 } 220 }
220 } 221 }
221 222
222 } // namespace aura 223 } // namespace aura
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_window_resizer.h ('k') | ash/wm/panels/panel_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698