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

Side by Side Diff: ash/wm/gestures/system_pinch_handler.h

Issue 101773004: Refactor PhantomWindowController so that the PhantomWindowController owns the phantom window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/ash.gyp ('k') | ash/wm/gestures/system_pinch_handler.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 #ifndef ASH_WM_GESTURES_SYSTEM_PINCH_HANDLER_H_ 5 #ifndef ASH_WM_GESTURES_SYSTEM_PINCH_HANDLER_H_
6 #define ASH_WM_GESTURES_SYSTEM_PINCH_HANDLER_H_ 6 #define ASH_WM_GESTURES_SYSTEM_PINCH_HANDLER_H_
7 7
8 #include "ash/wm/workspace/phantom_window_controller.h" 8 #include "ash/wm/workspace/phantom_window_controller.h"
9 #include "base/memory/scoped_ptr.h"
9 10
10 namespace aura { 11 namespace aura {
11 class Window; 12 class Window;
12 } 13 }
13 14
14 namespace gfx { 15 namespace gfx {
15 class Point; 16 class Point;
16 } 17 }
17 18
18 namespace ui { 19 namespace ui {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 PHANTOM_WINDOW_NORMAL, 58 PHANTOM_WINDOW_NORMAL,
58 PHANTOM_WINDOW_MAXIMIZED, 59 PHANTOM_WINDOW_MAXIMIZED,
59 PHANTOM_WINDOW_MINIMIZED, 60 PHANTOM_WINDOW_MINIMIZED,
60 }; 61 };
61 62
62 aura::Window* target_; 63 aura::Window* target_;
63 views::Widget* widget_; 64 views::Widget* widget_;
64 65
65 // A phantom window is used to provide visual cues for 66 // A phantom window is used to provide visual cues for
66 // pinch-to-resize/maximize/minimize gestures. 67 // pinch-to-resize/maximize/minimize gestures.
67 PhantomWindowController phantom_; 68 scoped_ptr<PhantomWindowController> phantom_;
68 69
69 // When the phantom window is in minimized or maximized state, moving the 70 // When the phantom window is in minimized or maximized state, moving the
70 // target window should not move the phantom window. So |phantom_state_| is 71 // target window should not move the phantom window. So |phantom_state_| is
71 // used to track the state of the phantom window. 72 // used to track the state of the phantom window.
72 PhantomWindowState phantom_state_; 73 PhantomWindowState phantom_state_;
73 74
74 // PINCH_UPDATE events include incremental pinch-amount. But it is necessary 75 // PINCH_UPDATE events include incremental pinch-amount. But it is necessary
75 // to keep track of the overall pinch-amount. |pinch_factor_| is used for 76 // to keep track of the overall pinch-amount. |pinch_factor_| is used for
76 // that. 77 // that.
77 double pinch_factor_; 78 double pinch_factor_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(SystemPinchHandler); 80 DISALLOW_COPY_AND_ASSIGN(SystemPinchHandler);
80 }; 81 };
81 82
82 } // namespace internal 83 } // namespace internal
83 } // namespace ash 84 } // namespace ash
84 85
85 #endif // ASH_WM_GESTURES_SYSTEM_PINCH_HANDLER_H_ 86 #endif // ASH_WM_GESTURES_SYSTEM_PINCH_HANDLER_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/wm/gestures/system_pinch_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698