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

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

Issue 32943006: [Refactor] Replace kFullscreenUsesMinimalChromeKey with WindowState::hide_shelf_when_fullscreen() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // aura::WindowObserver overrides: 103 // aura::WindowObserver overrides:
104 virtual void OnWindowPropertyChanged(aura::Window* window, 104 virtual void OnWindowPropertyChanged(aura::Window* window,
105 const void* key, 105 const void* key,
106 intptr_t old) OVERRIDE; 106 intptr_t old) OVERRIDE;
107 virtual void OnAddTransientChild(aura::Window* window, 107 virtual void OnAddTransientChild(aura::Window* window,
108 aura::Window* transient) OVERRIDE; 108 aura::Window* transient) OVERRIDE;
109 virtual void OnRemoveTransientChild(aura::Window* window, 109 virtual void OnRemoveTransientChild(aura::Window* window,
110 aura::Window* transient) OVERRIDE; 110 aura::Window* transient) OVERRIDE;
111 111
112 // Testing interface. 112 // Testing interface.
113 void SetForceHideTabIndicatorsForTest(bool force);
114 void StartRevealForTest(bool hovered); 113 void StartRevealForTest(bool hovered);
115 void SetMouseHoveredForTest(bool hovered); 114 void SetMouseHoveredForTest(bool hovered);
116 void DisableAnimationsForTest(); 115 void DisableAnimationsForTest();
117 116
118 private: 117 private:
119 friend class ImmersiveModeControllerAshTest; 118 friend class ImmersiveModeControllerAshTest;
120 119
121 enum AllowRevealWhileClosing { 120 enum AllowRevealWhileClosing {
122 ALLOW_REVEAL_WHILE_CLOSING_YES, 121 ALLOW_REVEAL_WHILE_CLOSING_YES,
123 ALLOW_REVEAL_WHILE_CLOSING_NO 122 ALLOW_REVEAL_WHILE_CLOSING_NO
124 }; 123 };
125 enum Animate { 124 enum Animate {
126 ANIMATE_NO, 125 ANIMATE_NO,
127 ANIMATE_SLOW, 126 ANIMATE_SLOW,
128 ANIMATE_FAST, 127 ANIMATE_FAST,
129 }; 128 };
130 enum Layout { 129 enum Layout {
131 LAYOUT_YES, 130 LAYOUT_YES,
132 LAYOUT_NO 131 LAYOUT_NO
133 }; 132 };
134 enum RevealState { 133 enum RevealState {
135 CLOSED, // Top container only showing tabstrip, y = 0. 134 CLOSED, // Top container only showing tabstrip, y = 0.
136 SLIDING_OPEN, // All views showing, y animating from -height to 0. 135 SLIDING_OPEN, // All views showing, y animating from -height to 0.
137 REVEALED, // All views showing, y = 0. 136 REVEALED, // All views showing, y = 0.
138 SLIDING_CLOSED, // All views showing, y animating from 0 to -height. 137 SLIDING_CLOSED, // All views showing, y animating from 0 to -height.
139 }; 138 };
140 enum TabIndicatorVisibility {
141 TAB_INDICATORS_FORCE_HIDE,
142 TAB_INDICATORS_HIDE,
143 TAB_INDICATORS_SHOW
144 };
145 enum SwipeType { 139 enum SwipeType {
146 SWIPE_OPEN, 140 SWIPE_OPEN,
147 SWIPE_CLOSE, 141 SWIPE_CLOSE,
148 SWIPE_NONE 142 SWIPE_NONE
149 }; 143 };
150 144
151 // Enables or disables observers for mouse move, focus, and window restore. 145 // Enables or disables observers for mouse move, focus, and window restore.
152 void EnableWindowObservers(bool enable); 146 void EnableWindowObservers(bool enable);
153 147
154 // Updates |top_edge_hover_timer_| based on a mouse |event|. If the mouse is 148 // Updates |top_edge_hover_timer_| based on a mouse |event|. If the mouse is
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 bool observers_enabled_; 245 bool observers_enabled_;
252 246
253 // True when in immersive mode. 247 // True when in immersive mode.
254 bool enabled_; 248 bool enabled_;
255 249
256 // State machine for the revealed/closed animations. 250 // State machine for the revealed/closed animations.
257 RevealState reveal_state_; 251 RevealState reveal_state_;
258 252
259 int revealed_lock_count_; 253 int revealed_lock_count_;
260 254
261 // The visibility of the miniature "tab indicators" in the main browser view
262 // when immersive mode is enabled and the top-of-window views are closed.
263 TabIndicatorVisibility tab_indicator_visibility_;
264
265 // Timer to track cursor being held at the top edge of the screen. 255 // Timer to track cursor being held at the top edge of the screen.
266 base::OneShotTimer<ImmersiveModeController> top_edge_hover_timer_; 256 base::OneShotTimer<ImmersiveModeController> top_edge_hover_timer_;
267 257
268 // The cursor x position in screen coordinates when the cursor first hit the 258 // The cursor x position in screen coordinates when the cursor first hit the
269 // top edge of the screen. 259 // top edge of the screen.
270 int mouse_x_when_hit_top_in_screen_; 260 int mouse_x_when_hit_top_in_screen_;
271 261
272 // Tracks if the controller has seen a ET_GESTURE_SCROLL_BEGIN, without the 262 // Tracks if the controller has seen a ET_GESTURE_SCROLL_BEGIN, without the
273 // following events. 263 // following events.
274 bool gesture_begun_; 264 bool gesture_begun_;
(...skipping 27 matching lines...) Expand all
302 scoped_ptr<BubbleManager> bubble_manager_; 292 scoped_ptr<BubbleManager> bubble_manager_;
303 293
304 content::NotificationRegistrar registrar_; 294 content::NotificationRegistrar registrar_;
305 295
306 base::WeakPtrFactory<ImmersiveModeControllerAsh> weak_ptr_factory_; 296 base::WeakPtrFactory<ImmersiveModeControllerAsh> weak_ptr_factory_;
307 297
308 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); 298 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh);
309 }; 299 };
310 300
311 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ 301 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698