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

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

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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/base_screen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 protected: 76 protected:
77 // Screen can call this method to notify framework that it have finished 77 // Screen can call this method to notify framework that it have finished
78 // it's work with |outcome|. 78 // it's work with |outcome|.
79 void Finish(BaseScreenDelegate::ExitCodes exit_code); 79 void Finish(BaseScreenDelegate::ExitCodes exit_code);
80 80
81 // Called when button with |button_id| was pressed. Notification 81 // Called when button with |button_id| was pressed. Notification
82 // about this event comes from the JS counterpart. 82 // about this event comes from the JS counterpart.
83 virtual void OnButtonPressed(const std::string& button_id); 83 virtual void OnButtonPressed(const std::string& button_id);
84 84
85 // Called when context for the currenct screen was 85 // The method is called each time some key in screen context is
86 // changed. Notification about this event comes from the JS 86 // updated by JS side. Default implementation does nothing, so
87 // counterpart. 87 // subclasses should override it in order to observe updates in
88 virtual void OnContextChanged(const base::DictionaryValue* diff); 88 // screen context.
89 virtual void OnContextKeyUpdated(const ::login::ScreenContext::KeyType& key);
89 90
90 BaseScreenDelegate* get_base_screen_delegate() const { 91 BaseScreenDelegate* get_base_screen_delegate() const {
91 return base_screen_delegate_; 92 return base_screen_delegate_;
92 } 93 }
93 94
94 ::login::ScreenContext context_; 95 ::login::ScreenContext context_;
95 96
96 private: 97 private:
97 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestCancel); 98 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestCancel);
98 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestSuccess); 99 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestSuccess);
99 FRIEND_TEST_ALL_PREFIXES(ProvisionedEnrollmentScreenTest, TestBackButton); 100 FRIEND_TEST_ALL_PREFIXES(ProvisionedEnrollmentScreenTest, TestBackButton);
100 101
102 friend class BaseScreenHandler;
101 friend class NetworkScreenTest; 103 friend class NetworkScreenTest;
102 friend class ScreenManager; 104 friend class ScreenManager;
103 friend class UpdateScreenTest; 105 friend class UpdateScreenTest;
104 106
105 void SetContext(::login::ScreenContext* context); 107 void SetContext(::login::ScreenContext* context);
106 108
109 // Called when context for the current screen was
110 // changed. Notification about this event comes from the JS
111 // counterpart.
112 void OnContextChanged(const base::DictionaryValue& diff);
113
107 BaseScreenDelegate* base_screen_delegate_; 114 BaseScreenDelegate* base_screen_delegate_;
108 115
109 DISALLOW_COPY_AND_ASSIGN(BaseScreen); 116 DISALLOW_COPY_AND_ASSIGN(BaseScreen);
110 }; 117 };
111 118
112 } // namespace chromeos 119 } // namespace chromeos
113 120
114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_ 121 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/base_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698