Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / webui / chromeos / touch_view_controller_delegate.h
blob037fa3548e3d0990bd401b24f700013d09ae768b
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_TOUCH_VIEW_CONTROLLER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_TOUCH_VIEW_CONTROLLER_DELEGATE_H_
8 #include "ash/shell_observer.h"
9 #include "base/observer_list.h"
11 namespace chromeos {
13 // An interface for ash::MaximizeModeController.
14 class TouchViewControllerDelegate : public ash::ShellObserver {
15 public:
16 // Observer that reports changes to the state of MaximizeModeController's
17 // rotation lock.
18 class Observer {
19 public:
20 // Invoked when maximize mode started/ended.
21 virtual void OnMaximizeModeStarted() {}
22 virtual void OnMaximizeModeEnded() {}
24 protected:
25 virtual ~Observer() {}
28 TouchViewControllerDelegate();
29 ~TouchViewControllerDelegate() override;
31 // Add/Remove observers.
32 void AddObserver(Observer* observer);
33 void RemoveObserver(Observer* observer);
35 // Test if the Maximize Mode is enabled or not.
36 bool IsMaximizeModeEnabled() const;
39 private:
40 // ash::ShellObserver implementation:
41 void OnMaximizeModeStarted() override;
42 void OnMaximizeModeEnded() override;
44 // Mode state change observers.
45 base::ObserverList<Observer> observers_;
47 DISALLOW_COPY_AND_ASSIGN(TouchViewControllerDelegate);
50 } // namespace chromeos
52 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_TOUCH_VIEW_CONTROLLER_DELEGATE_H_