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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_view.h

Issue 10106008: Change Panel titlebars to activate the panel on click (rather than minimize). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win compile Created 8 years, 8 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 | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/panels/panel_browser_view.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 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"
12 #include "chrome/browser/ui/panels/native_panel.h" 11 #include "chrome/browser/ui/panels/native_panel.h"
13 #include "chrome/browser/ui/views/frame/browser_view.h" 12 #include "chrome/browser/ui/views/frame/browser_view.h"
14 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
16 #include "ui/base/animation/animation_delegate.h" 15 #include "ui/base/animation/animation_delegate.h"
17 16
18 class Browser; 17 class Browser;
19 class NativePanelTestingWin; 18 class NativePanelTestingWin;
20 class Panel; 19 class Panel;
21 class PanelBoundsAnimation; 20 class PanelBoundsAnimation;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 bool focused_; 158 bool focused_;
160 159
161 // Is the mouse button currently down? 160 // Is the mouse button currently down?
162 bool mouse_pressed_; 161 bool mouse_pressed_;
163 162
164 // Location the mouse was pressed at or dragged to last time when we process 163 // Location the mouse was pressed at or dragged to last time when we process
165 // the mouse event. Used in drag-and-drop. 164 // the mouse event. Used in drag-and-drop.
166 // This point is represented in the screen coordinate system. 165 // This point is represented in the screen coordinate system.
167 gfx::Point last_mouse_location_; 166 gfx::Point last_mouse_location_;
168 167
169 // Timestamp when the mouse was pressed. Used to detect long click.
170 base::TimeTicks mouse_pressed_time_;
171
172 // Is the titlebar currently being dragged? That is, has the cursor 168 // Is the titlebar currently being dragged? That is, has the cursor
173 // moved more than kDragThreshold away from its starting position? 169 // moved more than kDragThreshold away from its starting position?
174 MouseDraggingState mouse_dragging_state_; 170 MouseDraggingState mouse_dragging_state_;
175 171
176 // Used to animate the bounds change. 172 // Used to animate the bounds change.
177 scoped_ptr<PanelBoundsAnimation> bounds_animator_; 173 scoped_ptr<PanelBoundsAnimation> bounds_animator_;
178 gfx::Rect animation_start_bounds_; 174 gfx::Rect animation_start_bounds_;
179 175
180 // Is the panel in highlighted state to draw people's attention? 176 // Is the panel in highlighted state to draw people's attention?
181 bool is_drawing_attention_; 177 bool is_drawing_attention_;
182 178
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 179 // The last view that had focus in the panel. This is saved so that focus can
188 // be restored properly when a drag ends. 180 // be restored properly when a drag ends.
189 views::View* old_focused_view_; 181 views::View* old_focused_view_;
190 182
191 content::NotificationRegistrar registrar_; 183 content::NotificationRegistrar registrar_;
192 184
193 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); 185 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView);
194 }; 186 };
195 187
196 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ 188 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/panels/panel_browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698