| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/login/screens/base_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/base_screen.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h" | 8 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 bool BaseScreen::IsStatusAreaDisplayed() { | 31 bool BaseScreen::IsStatusAreaDisplayed() { |
| 32 return true; | 32 return true; |
| 33 } | 33 } |
| 34 | 34 |
| 35 bool BaseScreen::IsPermanent() { | 35 bool BaseScreen::IsPermanent() { |
| 36 return false; | 36 return false; |
| 37 } | 37 } |
| 38 | 38 |
| 39 std::string BaseScreen::GetID() const { | 39 std::string BaseScreen::GetID() const { |
| 40 // TODO (ygorshenin, crbug.com/433797): elimitate intermediate |
| 41 // GetName() ASAP. |
| 40 return GetName(); | 42 return GetName(); |
| 41 } | 43 } |
| 42 | 44 |
| 43 void BaseScreen::Finish(BaseScreenDelegate::ExitCodes exit_code) { | 45 void BaseScreen::Finish(BaseScreenDelegate::ExitCodes exit_code) { |
| 44 base_screen_delegate_->OnExit(*this, exit_code, &context_); | 46 base_screen_delegate_->OnExit(*this, exit_code, &context_); |
| 45 } | 47 } |
| 46 | 48 |
| 47 void BaseScreen::SetContext(::login::ScreenContext* context) { | 49 void BaseScreen::SetContext(::login::ScreenContext* context) { |
| 48 } | 50 } |
| 49 | 51 |
| 50 void BaseScreen::OnButtonPressed(const std::string& button_id) { | 52 void BaseScreen::OnButtonPressed(const std::string& button_id) { |
| 51 LOG(WARNING) << "BaseScreen::OnButtonPressed(): button_id=" << button_id; | 53 LOG(WARNING) << "Unhandled button click: button_id=" << button_id; |
| 52 } | 54 } |
| 53 | 55 |
| 54 void BaseScreen::OnContextChanged(const base::DictionaryValue* diff) { | 56 void BaseScreen::OnContextKeyUpdated( |
| 55 LOG(WARNING) << "BaseScreen::OnContextChanged()"; | 57 const ::login::ScreenContext::KeyType& key) { |
| 58 LOG(WARNING) << "Unhandled context change: key=" << key; |
| 59 } |
| 60 |
| 61 void BaseScreen::OnContextChanged(const base::DictionaryValue& diff) { |
| 62 std::vector<::login::ScreenContext::KeyType> keys; |
| 63 context_.ApplyChanges(diff, &keys); |
| 64 for (const auto& key : keys) |
| 65 OnContextKeyUpdated(key); |
| 56 } | 66 } |
| 57 | 67 |
| 58 } // namespace chromeos | 68 } // namespace chromeos |
| OLD | NEW |