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 "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 for (size_t i = 0; i < handlers_.size(); ++i) { | 514 for (size_t i = 0; i < handlers_.size(); ++i) { |
515 if (handlers_[i]->async_assets_load_id().empty()) | 515 if (handlers_[i]->async_assets_load_id().empty()) |
516 handlers_[i]->InitializeBase(); | 516 handlers_[i]->InitializeBase(); |
517 } | 517 } |
518 | 518 |
519 // Instantiate the ShutdownPolicyHandler. | 519 // Instantiate the ShutdownPolicyHandler. |
520 shutdown_policy_handler_.reset( | 520 shutdown_policy_handler_.reset( |
521 new ShutdownPolicyHandler(CrosSettings::Get(), this)); | 521 new ShutdownPolicyHandler(CrosSettings::Get(), this)); |
522 | 522 |
523 // Trigger an initial update. | 523 // Trigger an initial update. |
524 shutdown_policy_handler_->CheckIfRebootOnShutdown( | 524 shutdown_policy_handler_->CheckIfRebootOnShutdown(); |
525 base::Bind(&OobeUI::OnShutdownPolicyChanged, base::Unretained(this))); | |
526 } | 525 } |
527 | 526 |
528 void OobeUI::OnScreenAssetsLoaded(const std::string& async_assets_load_id) { | 527 void OobeUI::OnScreenAssetsLoaded(const std::string& async_assets_load_id) { |
529 DCHECK(!async_assets_load_id.empty()); | 528 DCHECK(!async_assets_load_id.empty()); |
530 | 529 |
531 for (size_t i = 0; i < handlers_.size(); ++i) { | 530 for (size_t i = 0; i < handlers_.size(); ++i) { |
532 if (handlers_[i]->async_assets_load_id() == async_assets_load_id) | 531 if (handlers_[i]->async_assets_load_id() == async_assets_load_id) |
533 handlers_[i]->InitializeBase(); | 532 handlers_[i]->InitializeBase(); |
534 } | 533 } |
535 } | 534 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 // http://crbug.com/646034. | 598 // http://crbug.com/646034. |
600 NOTIMPLEMENTED(); | 599 NOTIMPLEMENTED(); |
601 } | 600 } |
602 | 601 |
603 current_screen_ = new_screen; | 602 current_screen_ = new_screen; |
604 for (Observer& observer : observer_list_) | 603 for (Observer& observer : observer_list_) |
605 observer.OnCurrentScreenChanged(current_screen_, new_screen); | 604 observer.OnCurrentScreenChanged(current_screen_, new_screen); |
606 } | 605 } |
607 | 606 |
608 } // namespace chromeos | 607 } // namespace chromeos |
OLD | NEW |