Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / ash / system / chromeos / rotation / tray_rotation_lock.h
blob9c53e6ed268cd80c9e37f95438a7bb1eee957b4f
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 ASH_SYSTEM_CHROMEOS_ROTATION_TRAY_ROTATION_LOCK_H_
6 #define ASH_SYSTEM_CHROMEOS_ROTATION_TRAY_ROTATION_LOCK_H_
8 #include "ash/shell_observer.h"
9 #include "ash/system/tray/tray_image_item.h"
11 namespace ash {
13 namespace tray {
14 class RotationLockDefaultView;
15 } // namespace tray
17 // TrayRotationLock is a provider of views for the SystemTray. Both a tray view
18 // and a default view are provided. Each view indicates the current state of
19 // the rotation lock for the display which it appears on. The default view can
20 // be interacted with, it toggles the state of the rotation lock.
21 // TrayRotationLock is only available on the primary display.
22 class ASH_EXPORT TrayRotationLock : public TrayImageItem,
23 public ShellObserver {
24 public:
25 explicit TrayRotationLock(SystemTray* system_tray);
26 virtual ~TrayRotationLock();
28 // SystemTrayItem:
29 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
31 // ShellObserver:
32 virtual void OnMaximizeModeStarted() OVERRIDE;
33 virtual void OnMaximizeModeEnded() OVERRIDE;
35 protected:
36 // TrayImageItem:
37 virtual bool GetInitialVisibility() OVERRIDE;
39 private:
40 friend class TrayRotationLockTest;
42 // True if this has been created by a SystemTray on the primary display.
43 bool on_primary_display_;
45 DISALLOW_COPY_AND_ASSIGN(TrayRotationLock);
48 } // namespace ash
50 #endif // ASH_SYSTEM_CHROMEOS_ROTATION_TRAY_ROTATION_LOCK_H_