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" |
11 #include "ash/wm/window_state_observer.h" | 11 #include "ash/wm/window_state_observer.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
14 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 | 16 |
17 namespace aura { | 17 namespace aura { |
18 class Window; | 18 class Window; |
19 } | 19 } |
20 | 20 |
21 class ImmersiveModeControllerAsh | 21 class ImmersiveModeControllerAsh |
James Cook
2013/11/25 19:09:20
Random thought for a future CL: It would be nice t
| |
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; |
(...skipping 18 matching lines...) Expand all Loading... | |
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 // Shrinks or expands the touch hit test by updating insets for the render | 53 // Shrinks or expands the touch hit test by updating insets for the render |
54 // window depending on if top_inset is positive or negative respectively. | 54 // window depending on if top_inset is positive or negative respectively. |
55 // Used to ensure that touch events at the top of the screen go to the top | 55 // Used to ensure that touch events at the top of the screen go to the top |
56 // container so a slide gesture can be generated when the content window is | 56 // container so a slide gesture can be generated when the content window is |
57 // consuming all touch events sent to it. | 57 // consuming all touch events sent to it. |
58 void SetRenderWindowTopInsetsForTouch(int top_inset); | 58 void SetRenderWindowTopInsetsForTouch(int top_inset); |
59 | 59 |
60 // Sets whether the tab strip is painted in a short "light bar" style. | 60 // Updates whether the tab strip is painted in a short "light bar" style. |
61 void SetTabIndicatorsVisible(bool visible); | 61 // Returns true if the visibility of the tab indicators has changed. |
62 bool UpdateTabIndicators(); | |
62 | 63 |
63 // ImmersiveFullscreenController::Delegate overrides: | 64 // ImmersiveFullscreenController::Delegate overrides: |
64 virtual void OnImmersiveRevealStarted() OVERRIDE; | 65 virtual void OnImmersiveRevealStarted() OVERRIDE; |
65 virtual void OnImmersiveRevealEnded() OVERRIDE; | 66 virtual void OnImmersiveRevealEnded() OVERRIDE; |
66 virtual void OnImmersiveFullscreenExited() OVERRIDE; | 67 virtual void OnImmersiveFullscreenExited() OVERRIDE; |
67 virtual void SetVisibleFraction(double visible_fraction) OVERRIDE; | 68 virtual void SetVisibleFraction(double visible_fraction) OVERRIDE; |
68 virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const OVERRIDE; | 69 virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const OVERRIDE; |
69 | 70 |
70 // ash::wm::WindowStateObserver override: | 71 // ash::wm::WindowStateObserver override: |
71 virtual void OnWindowShowTypeChanged( | 72 virtual void OnWindowShowTypeChanged( |
(...skipping 28 matching lines...) Expand all Loading... | |
100 // the top-of-window views are not revealed regardless of | 101 // the top-of-window views are not revealed regardless of |
101 // |use_tab_indicators_|. | 102 // |use_tab_indicators_|. |
102 double visible_fraction_; | 103 double visible_fraction_; |
103 | 104 |
104 content::NotificationRegistrar registrar_; | 105 content::NotificationRegistrar registrar_; |
105 | 106 |
106 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); | 107 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); |
107 }; | 108 }; |
108 | 109 |
109 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ | 110 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ |
OLD | NEW |