Index: chrome/browser/ui/views/frame/immersive_mode_controller_ash.h |
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.h b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.h |
index 50a0130445d3bc321f3f161c40c7d001668c7b2a..242010faa9374aeaf1d3a4906786c6c66f6f5011 100644 |
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.h |
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.h |
@@ -8,6 +8,8 @@ |
#include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
#include "base/timer.h" |
+#include "content/public/browser/notification_observer.h" |
+#include "content/public/browser/notification_registrar.h" |
#include "ui/base/events/event_handler.h" |
#include "ui/compositor/layer_animation_observer.h" |
#include "ui/views/focus/focus_manager.h" |
@@ -32,6 +34,7 @@ class View; |
} |
class ImmersiveModeControllerAsh : public ImmersiveModeController, |
+ public content::NotificationObserver, |
public ui::EventHandler, |
public ui::ImplicitAnimationObserver, |
public views::FocusChangeListener, |
@@ -65,6 +68,11 @@ class ImmersiveModeControllerAsh : public ImmersiveModeController, |
virtual void UnanchorWidgetFromTopContainer(views::Widget* widget) OVERRIDE; |
virtual void OnTopContainerBoundsChanged() OVERRIDE; |
+ // content::NotificationObserver override: |
+ virtual void Observe(int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) OVERRIDE; |
+ |
// ui::EventHandler overrides: |
virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
@@ -83,7 +91,7 @@ class ImmersiveModeControllerAsh : public ImmersiveModeController, |
virtual void OnImplicitAnimationsCompleted() OVERRIDE; |
// Testing interface. |
- void SetHideTabIndicatorsForTest(bool hide); |
+ void SetForceHideTabIndicatorsForTest(bool force); |
void StartRevealForTest(bool hovered); |
void SetMouseHoveredForTest(bool hovered); |
@@ -99,6 +107,11 @@ class ImmersiveModeControllerAsh : public ImmersiveModeController, |
REVEALED, // All views showing, y = 0. |
SLIDING_CLOSED, // All views showing, y animating from 0 to -height. |
}; |
+ enum TabIndicatorVisibility { |
+ TAB_INDICATORS_FORCE_HIDE, |
+ TAB_INDICATORS_HIDE, |
+ TAB_INDICATORS_SHOW |
+ }; |
// Enables or disables observers for mouse move, focus, and window restore. |
void EnableWindowObservers(bool enable); |
@@ -115,6 +128,12 @@ class ImmersiveModeControllerAsh : public ImmersiveModeController, |
// currently active widget. |
void UpdateFocusRevealedLock(); |
+ // Updates whether fullscreen uses any chrome at all. When using minimal |
+ // chrome, a 'light bar' is permanently visible for the launcher and possibly |
+ // for the tabstrip. |
+ // If |skip_layout| is true, no layout is done as part of the update. |
+ void UpdateUseMinimalChrome(bool skip_layout); |
James Cook
2013/04/22 18:14:16
Optional: Consider re-introducing the LAYOUT_YES,
|
+ |
// Returns the animation duration given |animate|. |
int GetAnimationDuration(Animate animate) const; |
@@ -164,9 +183,9 @@ class ImmersiveModeControllerAsh : public ImmersiveModeController, |
int revealed_lock_count_; |
- // True if the miniature "tab indicators" should be hidden in the main browser |
- // view when immersive mode is enabled. |
- bool hide_tab_indicators_; |
+ // The visibility of the miniature "tab indicators" in the main browser view |
+ // when immersive mode is enabled and the top-of-window views are closed. |
+ TabIndicatorVisibility tab_indicator_visibility_; |
// Timer to track cursor being held at the top. |
base::OneShotTimer<ImmersiveModeController> top_timer_; |
@@ -190,6 +209,8 @@ class ImmersiveModeControllerAsh : public ImmersiveModeController, |
class AnchoredWidgetManager; |
scoped_ptr<AnchoredWidgetManager> anchored_widget_manager_; |
+ content::NotificationRegistrar registrar_; |
+ |
base::WeakPtrFactory<ImmersiveModeControllerAsh> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); |