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

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

Issue 686463004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 "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
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 ~ImmersiveModeControllerAsh() override;
29 29
30 // ImmersiveModeController overrides: 30 // ImmersiveModeController overrides:
31 virtual void Init(BrowserView* browser_view) override; 31 void Init(BrowserView* browser_view) override;
32 virtual void SetEnabled(bool enabled) override; 32 void SetEnabled(bool enabled) override;
33 virtual bool IsEnabled() const override; 33 bool IsEnabled() const override;
34 virtual bool ShouldHideTabIndicators() const override; 34 bool ShouldHideTabIndicators() const override;
35 virtual bool ShouldHideTopViews() const override; 35 bool ShouldHideTopViews() const override;
36 virtual bool IsRevealed() const override; 36 bool IsRevealed() const override;
37 virtual int GetTopContainerVerticalOffset( 37 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 ImmersiveRevealedLock* GetRevealedLock(AnimateReveal animate_reveal) override
40 AnimateReveal animate_reveal) override WARN_UNUSED_RESULT; 40 WARN_UNUSED_RESULT;
41 virtual void OnFindBarVisibleBoundsChanged( 41 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 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 void OnImmersiveRevealStarted() override;
59 virtual void OnImmersiveRevealEnded() override; 59 void OnImmersiveRevealEnded() override;
60 virtual void OnImmersiveFullscreenExited() override; 60 void OnImmersiveFullscreenExited() override;
61 virtual void SetVisibleFraction(double visible_fraction) override; 61 void SetVisibleFraction(double visible_fraction) override;
62 virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const override; 62 std::vector<gfx::Rect> GetVisibleBoundsInScreen() const override;
63 63
64 // ash::wm::WindowStateObserver override: 64 // ash::wm::WindowStateObserver override:
65 virtual void OnPostWindowStateTypeChange( 65 void OnPostWindowStateTypeChange(ash::wm::WindowState* window_state,
66 ash::wm::WindowState* window_state, 66 ash::wm::WindowStateType old_type) override;
67 ash::wm::WindowStateType old_type) override;
68 67
69 // content::NotificationObserver override: 68 // content::NotificationObserver override:
70 virtual void Observe(int type, 69 void Observe(int type,
71 const content::NotificationSource& source, 70 const content::NotificationSource& source,
72 const content::NotificationDetails& details) override; 71 const content::NotificationDetails& details) override;
73 72
74 scoped_ptr<ash::ImmersiveFullscreenController> controller_; 73 scoped_ptr<ash::ImmersiveFullscreenController> controller_;
75 74
76 // Not owned. 75 // Not owned.
77 BrowserView* browser_view_; 76 BrowserView* browser_view_;
78 aura::Window* native_window_; 77 aura::Window* native_window_;
79 78
80 // True if the observers for window restore and entering / exiting tab 79 // True if the observers for window restore and entering / exiting tab
81 // fullscreen are enabled. 80 // fullscreen are enabled.
82 bool observers_enabled_; 81 bool observers_enabled_;
(...skipping 11 matching lines...) Expand all
94 // the top-of-window views are not revealed regardless of 93 // the top-of-window views are not revealed regardless of
95 // |use_tab_indicators_|. 94 // |use_tab_indicators_|.
96 double visible_fraction_; 95 double visible_fraction_;
97 96
98 content::NotificationRegistrar registrar_; 97 content::NotificationRegistrar registrar_;
99 98
100 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); 99 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh);
101 }; 100 };
102 101
103 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ 102 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/global_menu_bar_x11.h ('k') | chrome/browser/ui/views/frame/immersive_mode_controller_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698