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/error_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 bool ErrorScreenHandler::GetScreenName(OobeUI::Screen screen, | 122 bool ErrorScreenHandler::GetScreenName(OobeUI::Screen screen, |
123 std::string* name) const { | 123 std::string* name) const { |
124 OobeUI* oobe_ui = static_cast<OobeUI*>(web_ui()->GetController()); | 124 OobeUI* oobe_ui = static_cast<OobeUI*>(web_ui()->GetController()); |
125 if (!oobe_ui) | 125 if (!oobe_ui) |
126 return false; | 126 return false; |
127 *name = oobe_ui->GetScreenName(screen); | 127 *name = oobe_ui->GetScreenName(screen); |
128 return true; | 128 return true; |
129 } | 129 } |
130 | 130 |
131 void ErrorScreenHandler::HandleShowCaptivePortal(const base::ListValue* args) { | 131 void ErrorScreenHandler::HandleShowCaptivePortal() { |
132 ShowCaptivePortal(); | 132 ShowCaptivePortal(); |
133 } | 133 } |
134 | 134 |
135 void ErrorScreenHandler::HandleHideCaptivePortal(const base::ListValue* args) { | 135 void ErrorScreenHandler::HandleHideCaptivePortal() { |
136 HideCaptivePortal(); | 136 HideCaptivePortal(); |
137 } | 137 } |
138 | 138 |
139 void ErrorScreenHandler::RegisterMessages() { | 139 void ErrorScreenHandler::RegisterMessages() { |
140 AddCallback("showCaptivePortal", | 140 AddCallback("showCaptivePortal", |
141 &ErrorScreenHandler::HandleShowCaptivePortal); | 141 &ErrorScreenHandler::HandleShowCaptivePortal); |
142 AddCallback("hideCaptivePortal", | 142 AddCallback("hideCaptivePortal", |
143 &ErrorScreenHandler::HandleHideCaptivePortal); | 143 &ErrorScreenHandler::HandleHideCaptivePortal); |
144 } | 144 } |
145 | 145 |
(...skipping 16 matching lines...) Expand all Loading... |
162 void ErrorScreenHandler::Initialize() { | 162 void ErrorScreenHandler::Initialize() { |
163 if (!page_is_ready()) | 163 if (!page_is_ready()) |
164 return; | 164 return; |
165 if (show_on_init_) { | 165 if (show_on_init_) { |
166 Show(parent_screen_, NULL); | 166 Show(parent_screen_, NULL); |
167 show_on_init_ = false; | 167 show_on_init_ = false; |
168 } | 168 } |
169 } | 169 } |
170 | 170 |
171 } // namespace chromeos | 171 } // namespace chromeos |
OLD | NEW |