Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: chrome/browser/chromeos/login/screens/base_screen.cc

Issue 755203002: Added usage of ScreenContext in EulaScreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, fix to Screen.initialize(). Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/base_screen.h ('k') | chrome/browser/chromeos/login/screens/eula_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698