OLD | NEW |
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 "ash/wm/immersive_fullscreen_controller.h" | 10 #include "ash/wm/immersive_fullscreen_controller.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class ImmersiveModeControllerAsh | 21 class ImmersiveModeControllerAsh |
22 : public ImmersiveModeController, | 22 : public ImmersiveModeController, |
23 public ash::ImmersiveFullscreenController::Delegate, | 23 public ash::ImmersiveFullscreenController::Delegate, |
24 public ash::wm::WindowStateObserver, | 24 public ash::wm::WindowStateObserver, |
25 public content::NotificationObserver { | 25 public content::NotificationObserver { |
26 public: | 26 public: |
27 ImmersiveModeControllerAsh(); | 27 ImmersiveModeControllerAsh(); |
28 virtual ~ImmersiveModeControllerAsh(); | 28 virtual ~ImmersiveModeControllerAsh(); |
29 | 29 |
30 // ImmersiveModeController overrides: | 30 // ImmersiveModeController overrides: |
31 virtual void Init(BrowserView* browser_view) OVERRIDE; | 31 virtual void Init(BrowserView* browser_view) override; |
32 virtual void SetEnabled(bool enabled) OVERRIDE; | 32 virtual void SetEnabled(bool enabled) override; |
33 virtual bool IsEnabled() const OVERRIDE; | 33 virtual bool IsEnabled() const override; |
34 virtual bool ShouldHideTabIndicators() const OVERRIDE; | 34 virtual bool ShouldHideTabIndicators() const override; |
35 virtual bool ShouldHideTopViews() const OVERRIDE; | 35 virtual bool ShouldHideTopViews() const override; |
36 virtual bool IsRevealed() const OVERRIDE; | 36 virtual bool IsRevealed() const override; |
37 virtual int GetTopContainerVerticalOffset( | 37 virtual int GetTopContainerVerticalOffset( |
38 const gfx::Size& top_container_size) const OVERRIDE; | 38 const gfx::Size& top_container_size) const override; |
39 virtual ImmersiveRevealedLock* GetRevealedLock( | 39 virtual ImmersiveRevealedLock* GetRevealedLock( |
40 AnimateReveal animate_reveal) OVERRIDE WARN_UNUSED_RESULT; | 40 AnimateReveal animate_reveal) override WARN_UNUSED_RESULT; |
41 virtual void OnFindBarVisibleBoundsChanged( | 41 virtual void OnFindBarVisibleBoundsChanged( |
42 const gfx::Rect& new_visible_bounds_in_screen) OVERRIDE; | 42 const gfx::Rect& new_visible_bounds_in_screen) override; |
43 virtual void SetupForTest() OVERRIDE; | 43 virtual void SetupForTest() override; |
44 | 44 |
45 private: | 45 private: |
46 // Enables or disables observers for window restore and entering / exiting | 46 // Enables or disables observers for window restore and entering / exiting |
47 // tab fullscreen. | 47 // tab fullscreen. |
48 void EnableWindowObservers(bool enable); | 48 void EnableWindowObservers(bool enable); |
49 | 49 |
50 // Updates the browser root view's layout including window caption controls. | 50 // Updates the browser root view's layout including window caption controls. |
51 void LayoutBrowserRootView(); | 51 void LayoutBrowserRootView(); |
52 | 52 |
53 // Updates whether the tab strip is painted in a short "light bar" style. | 53 // Updates whether the tab strip is painted in a short "light bar" style. |
54 // Returns true if the visibility of the tab indicators has changed. | 54 // Returns true if the visibility of the tab indicators has changed. |
55 bool UpdateTabIndicators(); | 55 bool UpdateTabIndicators(); |
56 | 56 |
57 // ImmersiveFullscreenController::Delegate overrides: | 57 // ImmersiveFullscreenController::Delegate overrides: |
58 virtual void OnImmersiveRevealStarted() OVERRIDE; | 58 virtual void OnImmersiveRevealStarted() override; |
59 virtual void OnImmersiveRevealEnded() OVERRIDE; | 59 virtual void OnImmersiveRevealEnded() override; |
60 virtual void OnImmersiveFullscreenExited() OVERRIDE; | 60 virtual void OnImmersiveFullscreenExited() override; |
61 virtual void SetVisibleFraction(double visible_fraction) OVERRIDE; | 61 virtual void SetVisibleFraction(double visible_fraction) override; |
62 virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const OVERRIDE; | 62 virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const override; |
63 | 63 |
64 // ash::wm::WindowStateObserver override: | 64 // ash::wm::WindowStateObserver override: |
65 virtual void OnPostWindowStateTypeChange( | 65 virtual void OnPostWindowStateTypeChange( |
66 ash::wm::WindowState* window_state, | 66 ash::wm::WindowState* window_state, |
67 ash::wm::WindowStateType old_type) OVERRIDE; | 67 ash::wm::WindowStateType old_type) override; |
68 | 68 |
69 // content::NotificationObserver override: | 69 // content::NotificationObserver override: |
70 virtual void Observe(int type, | 70 virtual void Observe(int type, |
71 const content::NotificationSource& source, | 71 const content::NotificationSource& source, |
72 const content::NotificationDetails& details) OVERRIDE; | 72 const content::NotificationDetails& details) override; |
73 | 73 |
74 scoped_ptr<ash::ImmersiveFullscreenController> controller_; | 74 scoped_ptr<ash::ImmersiveFullscreenController> controller_; |
75 | 75 |
76 // Not owned. | 76 // Not owned. |
77 BrowserView* browser_view_; | 77 BrowserView* browser_view_; |
78 aura::Window* native_window_; | 78 aura::Window* native_window_; |
79 | 79 |
80 // True if the observers for window restore and entering / exiting tab | 80 // True if the observers for window restore and entering / exiting tab |
81 // fullscreen are enabled. | 81 // fullscreen are enabled. |
82 bool observers_enabled_; | 82 bool observers_enabled_; |
(...skipping 11 matching lines...) Expand all Loading... |
94 // the top-of-window views are not revealed regardless of | 94 // the top-of-window views are not revealed regardless of |
95 // |use_tab_indicators_|. | 95 // |use_tab_indicators_|. |
96 double visible_fraction_; | 96 double visible_fraction_; |
97 | 97 |
98 content::NotificationRegistrar registrar_; | 98 content::NotificationRegistrar registrar_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); | 100 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); |
101 }; | 101 }; |
102 | 102 |
103 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ | 103 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ |
OLD | NEW |