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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 void Shell::SetDisplayWorkAreaInsets(Window* contains, | 373 void Shell::SetDisplayWorkAreaInsets(Window* contains, |
374 const gfx::Insets& insets) { | 374 const gfx::Insets& insets) { |
375 if (!window_tree_host_manager_->UpdateWorkAreaOfDisplayNearestWindow( | 375 if (!window_tree_host_manager_->UpdateWorkAreaOfDisplayNearestWindow( |
376 contains, insets)) { | 376 contains, insets)) { |
377 return; | 377 return; |
378 } | 378 } |
379 FOR_EACH_OBSERVER(ShellObserver, observers_, | 379 FOR_EACH_OBSERVER(ShellObserver, observers_, |
380 OnDisplayWorkAreaInsetsChanged()); | 380 OnDisplayWorkAreaInsetsChanged()); |
381 } | 381 } |
382 | 382 |
383 void Shell::OnLoginStateChanged(user::LoginStatus status) { | 383 void Shell::OnLoginStateChanged(LoginStatus status) { |
384 FOR_EACH_OBSERVER(ShellObserver, observers_, OnLoginStateChanged(status)); | 384 FOR_EACH_OBSERVER(ShellObserver, observers_, OnLoginStateChanged(status)); |
385 } | 385 } |
386 | 386 |
387 void Shell::OnLoginUserProfilePrepared() { | 387 void Shell::OnLoginUserProfilePrepared() { |
388 CreateShelf(); | 388 CreateShelf(); |
389 CreateKeyboard(); | 389 CreateKeyboard(); |
390 } | 390 } |
391 | 391 |
392 void Shell::UpdateAfterLoginStatusChange(user::LoginStatus status) { | 392 void Shell::UpdateAfterLoginStatusChange(LoginStatus status) { |
393 RootWindowControllerList controllers = GetAllRootWindowControllers(); | 393 RootWindowControllerList controllers = GetAllRootWindowControllers(); |
394 for (RootWindowControllerList::iterator iter = controllers.begin(); | 394 for (RootWindowControllerList::iterator iter = controllers.begin(); |
395 iter != controllers.end(); ++iter) | 395 iter != controllers.end(); ++iter) |
396 (*iter)->UpdateAfterLoginStatusChange(status); | 396 (*iter)->UpdateAfterLoginStatusChange(status); |
397 } | 397 } |
398 | 398 |
399 void Shell::OnAppTerminating() { | 399 void Shell::OnAppTerminating() { |
400 FOR_EACH_OBSERVER(ShellObserver, observers_, OnAppTerminating()); | 400 FOR_EACH_OBSERVER(ShellObserver, observers_, OnAppTerminating()); |
401 } | 401 } |
402 | 402 |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 | 1249 |
1250 void Shell::OnWindowActivated( | 1250 void Shell::OnWindowActivated( |
1251 aura::client::ActivationChangeObserver::ActivationReason reason, | 1251 aura::client::ActivationChangeObserver::ActivationReason reason, |
1252 aura::Window* gained_active, | 1252 aura::Window* gained_active, |
1253 aura::Window* lost_active) { | 1253 aura::Window* lost_active) { |
1254 if (gained_active) | 1254 if (gained_active) |
1255 target_root_window_ = gained_active->GetRootWindow(); | 1255 target_root_window_ = gained_active->GetRootWindow(); |
1256 } | 1256 } |
1257 | 1257 |
1258 } // namespace ash | 1258 } // namespace ash |
OLD | NEW |