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

Side by Side Diff: chrome/browser/ui/views/frame/immersive_mode_controller_ash.h

Issue 22238003: Keep the top-of-window views revealed when clicking on the top-of-window views with a bubble open (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | « no previous file | chrome/browser/ui/views/frame/immersive_mode_controller_ash.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_
7 7
8 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" 8 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
9 9
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // Testing interface. 112 // Testing interface.
113 void SetForceHideTabIndicatorsForTest(bool force); 113 void SetForceHideTabIndicatorsForTest(bool force);
114 void StartRevealForTest(bool hovered); 114 void StartRevealForTest(bool hovered);
115 void SetMouseHoveredForTest(bool hovered); 115 void SetMouseHoveredForTest(bool hovered);
116 void DisableAnimationsForTest(); 116 void DisableAnimationsForTest();
117 117
118 private: 118 private:
119 friend class ImmersiveModeControllerAshTest; 119 friend class ImmersiveModeControllerAshTest;
120 120
121 enum AllowRevealWhileClosing {
122 ALLOW_REVEAL_WHILE_CLOSING_YES,
123 ALLOW_REVEAL_WHILE_CLOSING_NO
124 };
121 enum Animate { 125 enum Animate {
122 ANIMATE_NO, 126 ANIMATE_NO,
123 ANIMATE_SLOW, 127 ANIMATE_SLOW,
124 ANIMATE_FAST, 128 ANIMATE_FAST,
125 }; 129 };
126 enum Layout { 130 enum Layout {
127 LAYOUT_YES, 131 LAYOUT_YES,
128 LAYOUT_NO 132 LAYOUT_NO
129 }; 133 };
130 enum RevealState { 134 enum RevealState {
(...skipping 18 matching lines...) Expand all
149 153
150 // Updates |top_edge_hover_timer_| based on a mouse |event|. If the mouse is 154 // Updates |top_edge_hover_timer_| based on a mouse |event|. If the mouse is
151 // hovered at the top of the screen the timer is started. If the mouse moves 155 // hovered at the top of the screen the timer is started. If the mouse moves
152 // away from the top edge, or moves too much in the x direction, the timer is 156 // away from the top edge, or moves too much in the x direction, the timer is
153 // stopped. 157 // stopped.
154 void UpdateTopEdgeHoverTimer(ui::MouseEvent* event); 158 void UpdateTopEdgeHoverTimer(ui::MouseEvent* event);
155 159
156 // Updates |located_event_revealed_lock_| based on the current mouse state and 160 // Updates |located_event_revealed_lock_| based on the current mouse state and
157 // the current touch state. 161 // the current touch state.
158 // |event| is NULL if the source event is not known. 162 // |event| is NULL if the source event is not known.
159 void UpdateLocatedEventRevealedLock(ui::LocatedEvent* event); 163 // |allow_reveal_while_closing| indicates whether the mouse and touch
164 // are allowed to initiate a reveal while the top-of-window views are sliding
165 // closed.
166 void UpdateLocatedEventRevealedLock(
167 ui::LocatedEvent* event,
168 AllowRevealWhileClosing allow_reveal_while_closing);
160 169
161 // Acquires |located_event_revealed_lock_| if it is not already held. 170 // Acquires |located_event_revealed_lock_| if it is not already held.
162 void AcquireLocatedEventRevealedLock(); 171 void AcquireLocatedEventRevealedLock();
163 172
164 // Updates |focus_revealed_lock_| based on the currently active view and the 173 // Updates |focus_revealed_lock_| based on the currently active view and the
165 // currently active widget. 174 // currently active widget.
166 void UpdateFocusRevealedLock(); 175 void UpdateFocusRevealedLock();
167 176
168 // Update |located_event_revealed_lock_| and |focus_revealed_lock_| as a 177 // Update |located_event_revealed_lock_| and |focus_revealed_lock_| as a
169 // result of a gesture of |swipe_type|. Returns true if any locks were 178 // result of a gesture of |swipe_type|. Returns true if any locks were
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 scoped_ptr<BubbleManager> bubble_manager_; 305 scoped_ptr<BubbleManager> bubble_manager_;
297 306
298 content::NotificationRegistrar registrar_; 307 content::NotificationRegistrar registrar_;
299 308
300 base::WeakPtrFactory<ImmersiveModeControllerAsh> weak_ptr_factory_; 309 base::WeakPtrFactory<ImmersiveModeControllerAsh> weak_ptr_factory_;
301 310
302 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); 311 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh);
303 }; 312 };
304 313
305 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ 314 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698