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 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" |
11 #include "base/time.h" | 11 #include "base/time.h" |
jianli
2012/04/25 18:19:31
Can be removed.
jennb
2012/04/25 20:34:05
Done.
| |
12 #include "chrome/browser/ui/panels/native_panel.h" | 12 #include "chrome/browser/ui/panels/native_panel.h" |
13 #include "chrome/browser/ui/views/frame/browser_view.h" | 13 #include "chrome/browser/ui/views/frame/browser_view.h" |
14 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
15 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
16 #include "ui/base/animation/animation_delegate.h" | 16 #include "ui/base/animation/animation_delegate.h" |
17 | 17 |
18 class Browser; | 18 class Browser; |
19 class NativePanelTestingWin; | 19 class NativePanelTestingWin; |
20 class Panel; | 20 class Panel; |
21 class PanelBoundsAnimation; | 21 class PanelBoundsAnimation; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 | 160 |
161 // Is the mouse button currently down? | 161 // Is the mouse button currently down? |
162 bool mouse_pressed_; | 162 bool mouse_pressed_; |
163 | 163 |
164 // Location the mouse was pressed at or dragged to last time when we process | 164 // Location the mouse was pressed at or dragged to last time when we process |
165 // the mouse event. Used in drag-and-drop. | 165 // the mouse event. Used in drag-and-drop. |
166 // This point is represented in the screen coordinate system. | 166 // This point is represented in the screen coordinate system. |
167 gfx::Point last_mouse_location_; | 167 gfx::Point last_mouse_location_; |
168 | 168 |
169 // Timestamp when the mouse was pressed. Used to detect long click. | 169 // Timestamp when the mouse was pressed. Used to detect long click. |
170 base::TimeTicks mouse_pressed_time_; | 170 base::TimeTicks mouse_pressed_time_; |
jianli
2012/04/25 18:19:31
This can be removed now.
jennb
2012/04/25 20:34:05
Done.
| |
171 | 171 |
172 // Is the titlebar currently being dragged? That is, has the cursor | 172 // Is the titlebar currently being dragged? That is, has the cursor |
173 // moved more than kDragThreshold away from its starting position? | 173 // moved more than kDragThreshold away from its starting position? |
174 MouseDraggingState mouse_dragging_state_; | 174 MouseDraggingState mouse_dragging_state_; |
175 | 175 |
176 // Used to animate the bounds change. | 176 // Used to animate the bounds change. |
177 scoped_ptr<PanelBoundsAnimation> bounds_animator_; | 177 scoped_ptr<PanelBoundsAnimation> bounds_animator_; |
178 gfx::Rect animation_start_bounds_; | 178 gfx::Rect animation_start_bounds_; |
179 | 179 |
180 // Is the panel in highlighted state to draw people's attention? | 180 // Is the panel in highlighted state to draw people's attention? |
181 bool is_drawing_attention_; | 181 bool is_drawing_attention_; |
182 | 182 |
183 // Timestamp to prevent minimizing the panel when the user clicks the titlebar | |
184 // to clear the attension state. | |
185 base::TimeTicks attention_cleared_time_; | |
186 | |
187 // The last view that had focus in the panel. This is saved so that focus can | 183 // The last view that had focus in the panel. This is saved so that focus can |
188 // be restored properly when a drag ends. | 184 // be restored properly when a drag ends. |
189 views::View* old_focused_view_; | 185 views::View* old_focused_view_; |
190 | 186 |
191 content::NotificationRegistrar registrar_; | 187 content::NotificationRegistrar registrar_; |
192 | 188 |
193 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); | 189 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); |
194 }; | 190 }; |
195 | 191 |
196 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ | 192 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ |
OLD | NEW |