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 (*iter)->UpdateShelfVisibility(); | 510 (*iter)->UpdateShelfVisibility(); |
511 } | 511 } |
512 | 512 |
513 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, | 513 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
514 aura::Window* root_window) { | 514 aura::Window* root_window) { |
515 Shelf::ForWindow(root_window)->SetAutoHideBehavior(behavior); | 515 Shelf::ForWindow(root_window)->SetAutoHideBehavior(behavior); |
516 } | 516 } |
517 | 517 |
518 ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( | 518 ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( |
519 aura::Window* root_window) const { | 519 aura::Window* root_window) const { |
520 return Shelf::ForWindow(root_window)->GetAutoHideBehavior(); | 520 return Shelf::ForWindow(root_window)->auto_hide_behavior(); |
521 } | 521 } |
522 | 522 |
523 void Shell::SetShelfAlignment(ShelfAlignment alignment, | 523 void Shell::SetShelfAlignment(ShelfAlignment alignment, |
524 aura::Window* root_window) { | 524 aura::Window* root_window) { |
525 Shelf::ForWindow(root_window)->SetAlignment(alignment); | 525 Shelf::ForWindow(root_window)->SetAlignment(alignment); |
526 } | 526 } |
527 | 527 |
528 ShelfAlignment Shell::GetShelfAlignment(const aura::Window* root_window) const { | 528 ShelfAlignment Shell::GetShelfAlignment(const aura::Window* root_window) const { |
529 return Shelf::ForWindow(root_window)->GetAlignment(); | 529 return Shelf::ForWindow(root_window)->alignment(); |
530 } | 530 } |
531 | 531 |
532 void Shell::OnShelfAlignmentChanged(aura::Window* root_window) { | 532 void Shell::OnShelfAlignmentChanged(aura::Window* root_window) { |
533 FOR_EACH_OBSERVER(ShellObserver, observers_, | 533 FOR_EACH_OBSERVER(ShellObserver, observers_, |
534 OnShelfAlignmentChanged(root_window)); | 534 OnShelfAlignmentChanged(root_window)); |
535 } | 535 } |
536 | 536 |
537 void Shell::OnShelfAutoHideBehaviorChanged(aura::Window* root_window) { | 537 void Shell::OnShelfAutoHideBehaviorChanged(aura::Window* root_window) { |
538 FOR_EACH_OBSERVER(ShellObserver, observers_, | 538 FOR_EACH_OBSERVER(ShellObserver, observers_, |
539 OnShelfAutoHideBehaviorChanged(root_window)); | 539 OnShelfAutoHideBehaviorChanged(root_window)); |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1215 | 1215 |
1216 void Shell::OnWindowActivated( | 1216 void Shell::OnWindowActivated( |
1217 aura::client::ActivationChangeObserver::ActivationReason reason, | 1217 aura::client::ActivationChangeObserver::ActivationReason reason, |
1218 aura::Window* gained_active, | 1218 aura::Window* gained_active, |
1219 aura::Window* lost_active) { | 1219 aura::Window* lost_active) { |
1220 if (gained_active) | 1220 if (gained_active) |
1221 target_root_window_ = gained_active->GetRootWindow(); | 1221 target_root_window_ = gained_active->GetRootWindow(); |
1222 } | 1222 } |
1223 | 1223 |
1224 } // namespace ash | 1224 } // namespace ash |
OLD | NEW |