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

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

Issue 2702663002: [Merge to M57] cros-md: Remove the non-MD immersive mode code paths (Closed)
Patch Set: Created 3 years, 10 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
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 <memory> 8 #include <memory>
9 9
10 #include "ash/common/wm/window_state_observer.h" 10 #include "ash/common/wm/window_state_observer.h"
(...skipping 19 matching lines...) Expand all
30 public: 30 public:
31 ImmersiveModeControllerAsh(); 31 ImmersiveModeControllerAsh();
32 ~ImmersiveModeControllerAsh() override; 32 ~ImmersiveModeControllerAsh() override;
33 33
34 ash::ImmersiveFullscreenController* controller() { return controller_.get(); } 34 ash::ImmersiveFullscreenController* controller() { return controller_.get(); }
35 35
36 // ImmersiveModeController overrides: 36 // ImmersiveModeController overrides:
37 void Init(BrowserView* browser_view) override; 37 void Init(BrowserView* browser_view) override;
38 void SetEnabled(bool enabled) override; 38 void SetEnabled(bool enabled) override;
39 bool IsEnabled() const override; 39 bool IsEnabled() const override;
40 bool ShouldHideTabIndicators() const override;
41 bool ShouldHideTopViews() const override; 40 bool ShouldHideTopViews() const override;
42 bool IsRevealed() const override; 41 bool IsRevealed() const override;
43 int GetTopContainerVerticalOffset( 42 int GetTopContainerVerticalOffset(
44 const gfx::Size& top_container_size) const override; 43 const gfx::Size& top_container_size) const override;
45 ImmersiveRevealedLock* GetRevealedLock(AnimateReveal animate_reveal) override 44 ImmersiveRevealedLock* GetRevealedLock(AnimateReveal animate_reveal) override
46 WARN_UNUSED_RESULT; 45 WARN_UNUSED_RESULT;
47 void OnFindBarVisibleBoundsChanged( 46 void OnFindBarVisibleBoundsChanged(
48 const gfx::Rect& new_visible_bounds_in_screen) override; 47 const gfx::Rect& new_visible_bounds_in_screen) override;
49 48
50 private: 49 private:
51 // Enables or disables observers for window restore and entering / exiting 50 // Enables or disables observers for window restore and entering / exiting
52 // tab fullscreen. 51 // tab fullscreen.
53 void EnableWindowObservers(bool enable); 52 void EnableWindowObservers(bool enable);
54 53
55 // Updates the browser root view's layout including window caption controls. 54 // Updates the browser root view's layout including window caption controls.
56 void LayoutBrowserRootView(); 55 void LayoutBrowserRootView();
57 56
58 // Updates whether the tab strip is painted in a short "light bar" style.
59 // Returns true if the visibility of the tab indicators has changed.
60 bool UpdateTabIndicators();
61
62 // Used when running in mash to create |mash_reveal_widget_|. Does nothing 57 // Used when running in mash to create |mash_reveal_widget_|. Does nothing
63 // if already null. 58 // if already null.
64 void CreateMashRevealWidget(); 59 void CreateMashRevealWidget();
65 60
66 // Destroys |mash_reveal_widget_| if valid, does nothing otherwise. 61 // Destroys |mash_reveal_widget_| if valid, does nothing otherwise.
67 void DestroyMashRevealWidget(); 62 void DestroyMashRevealWidget();
68 63
69 // ImmersiveFullscreenController::Delegate overrides: 64 // ImmersiveFullscreenController::Delegate overrides:
70 void OnImmersiveRevealStarted() override; 65 void OnImmersiveRevealStarted() override;
71 void OnImmersiveRevealEnded() override; 66 void OnImmersiveRevealEnded() override;
(...skipping 13 matching lines...) Expand all
85 std::unique_ptr<ash::ImmersiveFullscreenController> controller_; 80 std::unique_ptr<ash::ImmersiveFullscreenController> controller_;
86 81
87 // Not owned. 82 // Not owned.
88 BrowserView* browser_view_; 83 BrowserView* browser_view_;
89 aura::Window* native_window_; 84 aura::Window* native_window_;
90 85
91 // True if the observers for window restore and entering / exiting tab 86 // True if the observers for window restore and entering / exiting tab
92 // fullscreen are enabled. 87 // fullscreen are enabled.
93 bool observers_enabled_; 88 bool observers_enabled_;
94 89
95 // Whether a short "light bar" version of the tab strip should be painted when
96 // the top-of-window views are closed. If |use_tab_indicators_| is false, the
97 // tab strip is not painted at all when the top-of-window views are closed.
98 bool use_tab_indicators_;
99
100 // The current visible bounds of the find bar, in screen coordinates. This is 90 // The current visible bounds of the find bar, in screen coordinates. This is
101 // an empty rect if the find bar is not visible. 91 // an empty rect if the find bar is not visible.
102 gfx::Rect find_bar_visible_bounds_in_screen_; 92 gfx::Rect find_bar_visible_bounds_in_screen_;
103 93
104 // The fraction of the TopContainerView's height which is visible. Zero when 94 // The fraction of the TopContainerView's height which is visible. Zero when
105 // the top-of-window views are not revealed regardless of 95 // the top-of-window views are not revealed.
106 // |use_tab_indicators_|.
107 double visible_fraction_; 96 double visible_fraction_;
108 97
109 // When running in mash a widget is created to draw the top container. This 98 // When running in mash a widget is created to draw the top container. This
110 // widget does not actually contain the top container, it just renders it. 99 // widget does not actually contain the top container, it just renders it.
111 std::unique_ptr<views::Widget> mash_reveal_widget_; 100 std::unique_ptr<views::Widget> mash_reveal_widget_;
112 101
113 content::NotificationRegistrar registrar_; 102 content::NotificationRegistrar registrar_;
114 103
115 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); 104 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh);
116 }; 105 };
117 106
118 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ 107 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698