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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/eula_screen_handler.cc

Issue 2713513009: cros: Break BaseScreenHandler into two classes. (Closed)
Patch Set: Add comments, fix compile Created 3 years, 9 months 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) 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/eula_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 IDS_CREDITS_APP_DIALOG_HEIGHT_PIXELS)); 76 IDS_CREDITS_APP_DIALOG_HEIGHT_PIXELS));
77 dialog->Show(); 77 dialog->Show();
78 // The dialog object will be deleted on dialog close. 78 // The dialog object will be deleted on dialog close.
79 } 79 }
80 80
81 } // namespace 81 } // namespace
82 82
83 namespace chromeos { 83 namespace chromeos {
84 84
85 EulaScreenHandler::EulaScreenHandler(CoreOobeView* core_oobe_view) 85 EulaScreenHandler::EulaScreenHandler(CoreOobeView* core_oobe_view)
86 : core_oobe_view_(core_oobe_view) { 86 : BaseScreenHandler(kScreenId), core_oobe_view_(core_oobe_view) {
87 set_call_js_prefix(kJsScreenPath); 87 set_call_js_prefix(kJsScreenPath);
88 } 88 }
89 89
90 EulaScreenHandler::~EulaScreenHandler() { 90 EulaScreenHandler::~EulaScreenHandler() {
91 if (screen_) 91 if (screen_)
92 screen_->OnViewDestroyed(this); 92 screen_->OnViewDestroyed(this);
93 } 93 }
94 94
95 void EulaScreenHandler::Show() { 95 void EulaScreenHandler::Show() {
96 if (!page_is_ready()) { 96 if (!page_is_ready()) {
97 show_on_init_ = true; 97 show_on_init_ = true;
98 return; 98 return;
99 } 99 }
100 ShowScreen(OobeScreen::SCREEN_OOBE_EULA); 100 ShowScreen(kScreenId);
101 } 101 }
102 102
103 void EulaScreenHandler::Hide() { 103 void EulaScreenHandler::Hide() {
104 } 104 }
105 105
106 void EulaScreenHandler::Bind(EulaScreen* screen) { 106 void EulaScreenHandler::Bind(EulaScreen* screen) {
107 screen_ = screen; 107 screen_ = screen;
108 BaseScreenHandler::SetBaseScreen(screen_); 108 BaseScreenHandler::SetBaseScreen(screen_);
109 if (page_is_ready()) 109 if (page_is_ready())
110 Initialize(); 110 Initialize();
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 IDS_ABOUT_VERSION_LICENSE_EULA, 213 IDS_ABOUT_VERSION_LICENSE_EULA,
214 GURL(chrome::kChromeUICreditsURL)); 214 GURL(chrome::kChromeUICreditsURL));
215 } 215 }
216 216
217 void EulaScreenHandler::HandleOnInstallationSettingsPopupOpened() { 217 void EulaScreenHandler::HandleOnInstallationSettingsPopupOpened() {
218 if (screen_) 218 if (screen_)
219 screen_->InitiatePasswordFetch(); 219 screen_->InitiatePasswordFetch();
220 } 220 }
221 221
222 } // namespace chromeos 222 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698