| 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/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Page JS API function names. | 57 // Page JS API function names. |
| 58 const char kJsApiSimStatusChanged[] = "mobile.SimUnlock.simStateChanged"; | 58 const char kJsApiSimStatusChanged[] = "mobile.SimUnlock.simStateChanged"; |
| 59 | 59 |
| 60 // SIM state variables which are passed to the page. | 60 // SIM state variables which are passed to the page. |
| 61 const char kState[] = "state"; | 61 const char kState[] = "state"; |
| 62 const char kError[] = "error"; | 62 const char kError[] = "error"; |
| 63 const char kTriesLeft[] = "tries"; | 63 const char kTriesLeft[] = "tries"; |
| 64 | 64 |
| 65 // Error constants, passed to the page. | 65 // Error constants, passed to the page. |
| 66 const char kErrorPin[] = "incorrectPin"; | 66 const char kErrorPin[] = "incorrectPin"; |
| 67 const char kErrorPuk[] = "incorrectPuk"; | |
| 68 const char kErrorOk[] = "ok"; | 67 const char kErrorOk[] = "ok"; |
| 69 | 68 |
| 70 chromeos::NetworkDeviceHandler* GetNetworkDeviceHandler() { | 69 chromeos::NetworkDeviceHandler* GetNetworkDeviceHandler() { |
| 71 return chromeos::NetworkHandler::Get()->network_device_handler(); | 70 return chromeos::NetworkHandler::Get()->network_device_handler(); |
| 72 } | 71 } |
| 73 | 72 |
| 74 chromeos::NetworkStateHandler* GetNetworkStateHandler() { | 73 chromeos::NetworkStateHandler* GetNetworkStateHandler() { |
| 75 return chromeos::NetworkHandler::Get()->network_state_handler(); | 74 return chromeos::NetworkHandler::Get()->network_state_handler(); |
| 76 } | 75 } |
| 77 | 76 |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 SimUnlockHandler* handler = new SimUnlockHandler(); | 829 SimUnlockHandler* handler = new SimUnlockHandler(); |
| 831 web_ui->AddMessageHandler(handler); | 830 web_ui->AddMessageHandler(handler); |
| 832 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); | 831 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); |
| 833 | 832 |
| 834 // Set up the chrome://sim-unlock/ source. | 833 // Set up the chrome://sim-unlock/ source. |
| 835 Profile* profile = Profile::FromWebUI(web_ui); | 834 Profile* profile = Profile::FromWebUI(web_ui); |
| 836 content::URLDataSource::Add(profile, html_source); | 835 content::URLDataSource::Add(profile, html_source); |
| 837 } | 836 } |
| 838 | 837 |
| 839 } // namespace chromeos | 838 } // namespace chromeos |
| OLD | NEW |