| 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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 (*iter)->UpdateShelfVisibility(); | 506 (*iter)->UpdateShelfVisibility(); |
| 507 } | 507 } |
| 508 | 508 |
| 509 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, | 509 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
| 510 aura::Window* root_window) { | 510 aura::Window* root_window) { |
| 511 Shelf::ForWindow(root_window)->SetAutoHideBehavior(behavior); | 511 Shelf::ForWindow(root_window)->SetAutoHideBehavior(behavior); |
| 512 } | 512 } |
| 513 | 513 |
| 514 ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( | 514 ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( |
| 515 aura::Window* root_window) const { | 515 aura::Window* root_window) const { |
| 516 return Shelf::ForWindow(root_window)->GetAutoHideBehavior(); | 516 return Shelf::ForWindow(root_window)->auto_hide_behavior(); |
| 517 } | 517 } |
| 518 | 518 |
| 519 void Shell::SetShelfAlignment(ShelfAlignment alignment, | 519 void Shell::SetShelfAlignment(ShelfAlignment alignment, |
| 520 aura::Window* root_window) { | 520 aura::Window* root_window) { |
| 521 Shelf::ForWindow(root_window)->SetAlignment(alignment); | 521 Shelf::ForWindow(root_window)->SetAlignment(alignment); |
| 522 } | 522 } |
| 523 | 523 |
| 524 ShelfAlignment Shell::GetShelfAlignment(const aura::Window* root_window) const { | 524 ShelfAlignment Shell::GetShelfAlignment(const aura::Window* root_window) const { |
| 525 return Shelf::ForWindow(root_window)->GetAlignment(); | 525 return Shelf::ForWindow(root_window)->alignment(); |
| 526 } | 526 } |
| 527 | 527 |
| 528 void Shell::OnShelfAlignmentChanged(aura::Window* root_window) { | 528 void Shell::OnShelfAlignmentChanged(aura::Window* root_window) { |
| 529 FOR_EACH_OBSERVER(ShellObserver, observers_, | 529 FOR_EACH_OBSERVER(ShellObserver, observers_, |
| 530 OnShelfAlignmentChanged(root_window)); | 530 OnShelfAlignmentChanged(root_window)); |
| 531 } | 531 } |
| 532 | 532 |
| 533 void Shell::OnShelfAutoHideBehaviorChanged(aura::Window* root_window) { | 533 void Shell::OnShelfAutoHideBehaviorChanged(aura::Window* root_window) { |
| 534 FOR_EACH_OBSERVER(ShellObserver, observers_, | 534 FOR_EACH_OBSERVER(ShellObserver, observers_, |
| 535 OnShelfAutoHideBehaviorChanged(root_window)); | 535 OnShelfAutoHideBehaviorChanged(root_window)); |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 | 1225 |
| 1226 void Shell::OnWindowActivated( | 1226 void Shell::OnWindowActivated( |
| 1227 aura::client::ActivationChangeObserver::ActivationReason reason, | 1227 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 1228 aura::Window* gained_active, | 1228 aura::Window* gained_active, |
| 1229 aura::Window* lost_active) { | 1229 aura::Window* lost_active) { |
| 1230 if (gained_active) | 1230 if (gained_active) |
| 1231 target_root_window_ = gained_active->GetRootWindow(); | 1231 target_root_window_ = gained_active->GetRootWindow(); |
| 1232 } | 1232 } |
| 1233 | 1233 |
| 1234 } // namespace ash | 1234 } // namespace ash |
| OLD | NEW |