| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "ash/shell.h" | 5 #include "ash/shell.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, | 510 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
| 511 aura::Window* root_window) { | 511 aura::Window* root_window) { |
| 512 Shelf::ForWindow(root_window)->SetAutoHideBehavior(behavior); | 512 Shelf::ForWindow(root_window)->SetAutoHideBehavior(behavior); |
| 513 } | 513 } |
| 514 | 514 |
| 515 ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( | 515 ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( |
| 516 aura::Window* root_window) const { | 516 aura::Window* root_window) const { |
| 517 return Shelf::ForWindow(root_window)->auto_hide_behavior(); | 517 return Shelf::ForWindow(root_window)->auto_hide_behavior(); |
| 518 } | 518 } |
| 519 | 519 |
| 520 void Shell::SetShelfAlignment(ShelfAlignment alignment, | 520 void Shell::SetShelfAlignment(wm::ShelfAlignment alignment, |
| 521 aura::Window* root_window) { | 521 aura::Window* root_window) { |
| 522 Shelf::ForWindow(root_window)->SetAlignment(alignment); | 522 Shelf::ForWindow(root_window)->SetAlignment(alignment); |
| 523 } | 523 } |
| 524 | 524 |
| 525 ShelfAlignment Shell::GetShelfAlignment(const aura::Window* root_window) const { | 525 wm::ShelfAlignment Shell::GetShelfAlignment( |
| 526 const aura::Window* root_window) const { |
| 526 return Shelf::ForWindow(root_window)->alignment(); | 527 return Shelf::ForWindow(root_window)->alignment(); |
| 527 } | 528 } |
| 528 | 529 |
| 529 void Shell::OnShelfAlignmentChanged(aura::Window* root_window) { | 530 void Shell::OnShelfAlignmentChanged(aura::Window* root_window) { |
| 530 FOR_EACH_OBSERVER(ShellObserver, observers_, | 531 FOR_EACH_OBSERVER(ShellObserver, observers_, |
| 531 OnShelfAlignmentChanged(root_window)); | 532 OnShelfAlignmentChanged(root_window)); |
| 532 } | 533 } |
| 533 | 534 |
| 534 void Shell::OnShelfAutoHideBehaviorChanged(aura::Window* root_window) { | 535 void Shell::OnShelfAutoHideBehaviorChanged(aura::Window* root_window) { |
| 535 FOR_EACH_OBSERVER(ShellObserver, observers_, | 536 FOR_EACH_OBSERVER(ShellObserver, observers_, |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 | 1238 |
| 1238 void Shell::OnWindowActivated( | 1239 void Shell::OnWindowActivated( |
| 1239 aura::client::ActivationChangeObserver::ActivationReason reason, | 1240 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 1240 aura::Window* gained_active, | 1241 aura::Window* gained_active, |
| 1241 aura::Window* lost_active) { | 1242 aura::Window* lost_active) { |
| 1242 if (gained_active) | 1243 if (gained_active) |
| 1243 target_root_window_ = gained_active->GetRootWindow(); | 1244 target_root_window_ = gained_active->GetRootWindow(); |
| 1244 } | 1245 } |
| 1245 | 1246 |
| 1246 } // namespace ash | 1247 } // namespace ash |
| OLD | NEW |