OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // Is the panel being closed? Do not use it when it is closed. | 123 // Is the panel being closed? Do not use it when it is closed. |
124 bool closed_; | 124 bool closed_; |
125 | 125 |
126 // Is the panel receiving the focus? | 126 // Is the panel receiving the focus? |
127 bool focused_; | 127 bool focused_; |
128 | 128 |
129 // Is the mouse button currently down? | 129 // Is the mouse button currently down? |
130 bool mouse_pressed_; | 130 bool mouse_pressed_; |
131 | 131 |
132 // Location the mouse was pressed at. Used to detect drag and drop. | 132 // Location the mouse was pressed at or dragged to. Used in drag-and-drop. |
133 gfx::Point mouse_pressed_point_; | 133 // This point is represented in the screen coordinate system. |
| 134 gfx::Point mouse_location_; |
134 | 135 |
135 // Timestamp when the mouse was pressed. Used to detect long click. | 136 // Timestamp when the mouse was pressed. Used to detect long click. |
136 base::TimeTicks mouse_pressed_time_; | 137 base::TimeTicks mouse_pressed_time_; |
137 | 138 |
138 // Is the titlebar currently being dragged? That is, has the cursor | 139 // Is the titlebar currently being dragged? That is, has the cursor |
139 // moved more than kDragThreshold away from its starting position? | 140 // moved more than kDragThreshold away from its starting position? |
140 MouseDraggingState mouse_dragging_state_; | 141 MouseDraggingState mouse_dragging_state_; |
141 | 142 |
142 // Used to animate the bounds change. | 143 // Used to animate the bounds change. |
143 scoped_ptr<ui::SlideAnimation> bounds_animator_; | 144 scoped_ptr<ui::SlideAnimation> bounds_animator_; |
144 gfx::Rect animation_start_bounds_; | 145 gfx::Rect animation_start_bounds_; |
145 | 146 |
146 // Is the panel in highlighted state to draw people's attention? | 147 // Is the panel in highlighted state to draw people's attention? |
147 bool is_drawing_attention_; | 148 bool is_drawing_attention_; |
148 | 149 |
149 // Timestamp to prevent minimizing the panel when the user clicks the titlebar | 150 // Timestamp to prevent minimizing the panel when the user clicks the titlebar |
150 // to clear the attension state. | 151 // to clear the attension state. |
151 base::TimeTicks attention_cleared_time_; | 152 base::TimeTicks attention_cleared_time_; |
152 | 153 |
153 // The last view that had focus in the panel. This is saved so that focus can | 154 // The last view that had focus in the panel. This is saved so that focus can |
154 // be restored properly when a drag ends. | 155 // be restored properly when a drag ends. |
155 views::View* old_focused_view_; | 156 views::View* old_focused_view_; |
156 | 157 |
157 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); | 158 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); |
158 }; | 159 }; |
159 | 160 |
160 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ | 161 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ |
OLD | NEW |