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

Unified Diff: ash/system/chromeos/rotation/tray_rotation_lock.h

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/chromeos/rotation/tray_rotation_lock.h
diff --git a/ash/system/chromeos/rotation/tray_rotation_lock.h b/ash/system/chromeos/rotation/tray_rotation_lock.h
deleted file mode 100644
index 109376c98058f0e393c28c76eebaf31d3b550693..0000000000000000000000000000000000000000
--- a/ash/system/chromeos/rotation/tray_rotation_lock.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_ROTATION_TRAY_ROTATION_LOCK_H_
-#define ASH_SYSTEM_CHROMEOS_ROTATION_TRAY_ROTATION_LOCK_H_
-
-#include "ash/common/shell_observer.h"
-#include "ash/common/system/tray/tray_image_item.h"
-#include "ash/display/screen_orientation_controller_chromeos.h"
-#include "base/macros.h"
-
-namespace ash {
-
-// TrayRotationLock is a provider of views for the SystemTray. Both a tray view
-// and a default view are provided. Each view indicates the current state of
-// the rotation lock for the display which it appears on. The default view can
-// be interacted with, it toggles the state of the rotation lock.
-// TrayRotationLock is only available on the primary display.
-class ASH_EXPORT TrayRotationLock
- : public TrayImageItem,
- public ScreenOrientationController::Observer,
- public ShellObserver {
- public:
- explicit TrayRotationLock(SystemTray* system_tray);
- ~TrayRotationLock() override;
-
- // ScreenOrientationController::Observer:
- void OnRotationLockChanged(bool rotation_locked) override;
-
- // SystemTrayItem:
- views::View* CreateDefaultView(LoginStatus status) override;
-
- // ShellObserver:
- void OnMaximizeModeStarted() override;
- void OnMaximizeModeEnded() override;
-
- // TrayImageItem:
- void DestroyTrayView() override;
-
- protected:
- // TrayImageItem:
- bool GetInitialVisibility() override;
-
- private:
- friend class TrayRotationLockTest;
-
- // True if |on_primary_display_|, maximize mode is enabled, and rotation is
- // locked.
- bool ShouldBeVisible();
-
- // True if this is owned by a SystemTray on the primary display.
- bool OnPrimaryDisplay() const;
-
- // Removes TrayRotationLock as a ScreenOrientationController::Observer if
- // currently observing.
- void StopObservingRotation();
-
- DISALLOW_COPY_AND_ASSIGN(TrayRotationLock);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_ROTATION_TRAY_ROTATION_LOCK_H_
« no previous file with comments | « ash/system/chromeos/power/video_activity_notifier_unittest.cc ('k') | ash/system/chromeos/rotation/tray_rotation_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698