| Index: ash/display/screen_orientation_controller_chromeos.cc
|
| diff --git a/ash/display/screen_orientation_controller_chromeos.cc b/ash/display/screen_orientation_controller_chromeos.cc
|
| index 45c8bcd0e2a3ffca688edac6fc44d6bf4c87ecaa..c38bef1ed70d5a8a90d9f07a9f05c6abd0ccb11a 100644
|
| --- a/ash/display/screen_orientation_controller_chromeos.cc
|
| +++ b/ash/display/screen_orientation_controller_chromeos.cc
|
| @@ -76,7 +76,7 @@ ScreenOrientationController::~ScreenOrientationController() {
|
| WmShell::Get()->RemoveDisplayObserver(this);
|
| WmShell::Get()->RemoveActivationObserver(this);
|
| for (auto& windows : locking_windows_)
|
| - windows.first->RemoveObserver(this);
|
| + windows.first->aura_window()->RemoveObserver(this);
|
| }
|
|
|
| void ScreenOrientationController::AddObserver(Observer* observer) {
|
| @@ -93,8 +93,8 @@ void ScreenOrientationController::LockOrientationForWindow(
|
| if (locking_windows_.empty())
|
| WmShell::Get()->AddActivationObserver(this);
|
|
|
| - if (!requesting_window->HasObserver(this))
|
| - requesting_window->AddObserver(this);
|
| + if (!requesting_window->aura_window()->HasObserver(this))
|
| + requesting_window->aura_window()->AddObserver(this);
|
| locking_windows_[requesting_window] = lock_orientation;
|
|
|
| ApplyLockForActiveWindow();
|
| @@ -104,13 +104,13 @@ void ScreenOrientationController::UnlockOrientationForWindow(WmWindow* window) {
|
| locking_windows_.erase(window);
|
| if (locking_windows_.empty())
|
| WmShell::Get()->RemoveActivationObserver(this);
|
| - window->RemoveObserver(this);
|
| + window->aura_window()->RemoveObserver(this);
|
| ApplyLockForActiveWindow();
|
| }
|
|
|
| void ScreenOrientationController::UnlockAll() {
|
| for (auto pair : locking_windows_)
|
| - pair.first->RemoveObserver(this);
|
| + pair.first->aura_window()->RemoveObserver(this);
|
| locking_windows_.clear();
|
| WmShell::Get()->RemoveActivationObserver(this);
|
| SetRotationLocked(false);
|
| @@ -161,8 +161,8 @@ void ScreenOrientationController::OnWindowActivated(WmWindow* gained_active,
|
| ApplyLockForActiveWindow();
|
| }
|
|
|
| -void ScreenOrientationController::OnWindowDestroying(WmWindow* window) {
|
| - UnlockOrientationForWindow(window);
|
| +void ScreenOrientationController::OnWindowDestroying(aura::Window* window) {
|
| + UnlockOrientationForWindow(WmWindow::Get(window));
|
| }
|
|
|
| // Currently contents::WebContents will only be able to lock rotation while
|
| @@ -172,9 +172,10 @@ void ScreenOrientationController::OnWindowDestroying(WmWindow* window) {
|
| // down and mouse up. The rotation this triggers leads to a coordinate space
|
| // change in the middle of an event. Causes the tab to separate from the tab
|
| // strip.
|
| -void ScreenOrientationController::OnWindowVisibilityChanged(WmWindow* window,
|
| - bool visible) {
|
| - if (locking_windows_.find(window) == locking_windows_.end())
|
| +void ScreenOrientationController::OnWindowVisibilityChanged(
|
| + aura::Window* window,
|
| + bool visible) {
|
| + if (locking_windows_.find(WmWindow::Get(window)) == locking_windows_.end())
|
| return;
|
| ApplyLockForActiveWindow();
|
| }
|
|
|