OLD | NEW |
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_DRAG_WINDOW_CONTROLLER_H_ | 5 #ifndef ASH_WM_DRAG_WINDOW_CONTROLLER_H_ |
6 #define ASH_WM_DRAG_WINDOW_CONTROLLER_H_ | 6 #define ASH_WM_DRAG_WINDOW_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 void Hide(); | 47 void Hide(); |
48 | 48 |
49 // This is used to set bounds for the drag window immediately. This should | 49 // This is used to set bounds for the drag window immediately. This should |
50 // be called only when the drag window is already visible. | 50 // be called only when the drag window is already visible. |
51 void SetBounds(const gfx::Rect& bounds); | 51 void SetBounds(const gfx::Rect& bounds); |
52 | 52 |
53 // Sets the opacity of the drag window. | 53 // Sets the opacity of the drag window. |
54 void SetOpacity(float opacity); | 54 void SetOpacity(float opacity); |
55 | 55 |
56 private: | 56 private: |
57 FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, DragWindowController); | 57 FRIEND_TEST_ALL_PREFIXES(DragWindowResizerTest, DragWindowController); |
58 | 58 |
59 // Creates and shows the |drag_widget_| at |bounds|. | 59 // Creates and shows the |drag_widget_| at |bounds|. |
60 // |layer| is shown on top of the drag window if it is non-NULL. | 60 // |layer| is shown on top of the drag window if it is non-NULL. |
61 // |layer| is not owned by this object. | 61 // |layer| is not owned by this object. |
62 void CreateDragWidget(const gfx::Rect& bounds); | 62 void CreateDragWidget(const gfx::Rect& bounds); |
63 | 63 |
64 // Sets bounds of the drag window. The window is shown on |dst_display_| | 64 // Sets bounds of the drag window. The window is shown on |dst_display_| |
65 // if its id() is valid. Otherwise, a display nearest to |bounds| is chosen. | 65 // if its id() is valid. Otherwise, a display nearest to |bounds| is chosen. |
66 void SetBoundsInternal(const gfx::Rect& bounds); | 66 void SetBoundsInternal(const gfx::Rect& bounds); |
67 | 67 |
(...skipping 20 matching lines...) Expand all Loading... |
88 // the layer. | 88 // the layer. |
89 ui::Layer* layer_; | 89 ui::Layer* layer_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(DragWindowController); | 91 DISALLOW_COPY_AND_ASSIGN(DragWindowController); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace internal | 94 } // namespace internal |
95 } // namespace ash | 95 } // namespace ash |
96 | 96 |
97 #endif // ASH_WM_DRAG_WINDOW_CONTROLLER_H_ | 97 #endif // ASH_WM_DRAG_WINDOW_CONTROLLER_H_ |
OLD | NEW |