| 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/sim_unlock_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 // Pending code type. | 182 // Pending code type. |
| 183 SimUnlockCode code_type_; | 183 SimUnlockCode code_type_; |
| 184 | 184 |
| 185 DISALLOW_COPY_AND_ASSIGN(TaskProxy); | 185 DISALLOW_COPY_AND_ASSIGN(TaskProxy); |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 // Processing for the cases when dialog was cancelled. | 188 // Processing for the cases when dialog was cancelled. |
| 189 void CancelDialog(); | 189 void CancelDialog(); |
| 190 | 190 |
| 191 // Pass PIN/PUK code to flimflam and check status. | 191 // Pass PIN/PUK code to shill and check status. |
| 192 void EnterCode(const std::string& code, SimUnlockCode code_type); | 192 void EnterCode(const std::string& code, SimUnlockCode code_type); |
| 193 | 193 |
| 194 // Single handler for PIN/PUK code operations. | 194 // Single handler for PIN/PUK code operations. |
| 195 void HandleEnterCode(SimUnlockCode code_type, const std::string& code); | 195 void HandleEnterCode(SimUnlockCode code_type, const std::string& code); |
| 196 | 196 |
| 197 // Handlers for JS WebUI messages. | 197 // Handlers for JS WebUI messages. |
| 198 void HandleCancel(const ListValue* args); | 198 void HandleCancel(const ListValue* args); |
| 199 void HandleChangePinCode(const ListValue* args); | 199 void HandleChangePinCode(const ListValue* args); |
| 200 void HandleEnterPinCode(const ListValue* args); | 200 void HandleEnterPinCode(const ListValue* args); |
| 201 void HandleEnterPukCode(const ListValue* args); | 201 void HandleEnterPukCode(const ListValue* args); |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 SimUnlockHandler* handler = new SimUnlockHandler(); | 673 SimUnlockHandler* handler = new SimUnlockHandler(); |
| 674 web_ui->AddMessageHandler(handler); | 674 web_ui->AddMessageHandler(handler); |
| 675 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); | 675 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); |
| 676 | 676 |
| 677 // Set up the chrome://sim-unlock/ source. | 677 // Set up the chrome://sim-unlock/ source. |
| 678 Profile* profile = Profile::FromWebUI(web_ui); | 678 Profile* profile = Profile::FromWebUI(web_ui); |
| 679 ChromeURLDataManager::AddDataSource(profile, html_source); | 679 ChromeURLDataManager::AddDataSource(profile, html_source); |
| 680 } | 680 } |
| 681 | 681 |
| 682 } // namespace chromeos | 682 } // namespace chromeos |
| OLD | NEW |