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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 if (handler_) | 163 if (handler_) |
164 handler_->InitializeSimStatus(); | 164 handler_->InitializeSimStatus(); |
165 } | 165 } |
166 | 166 |
167 void HandleProceedToPukInput() { | 167 void HandleProceedToPukInput() { |
168 if (handler_) | 168 if (handler_) |
169 handler_->ProceedToPukInput(); | 169 handler_->ProceedToPukInput(); |
170 } | 170 } |
171 | 171 |
172 private: | 172 private: |
| 173 friend class base::RefCountedThreadSafe<TaskProxy>; |
| 174 |
| 175 ~TaskProxy() {} |
| 176 |
173 base::WeakPtr<SimUnlockHandler> handler_; | 177 base::WeakPtr<SimUnlockHandler> handler_; |
174 | 178 |
175 // Pending code input (PIN/PUK). | 179 // Pending code input (PIN/PUK). |
176 std::string code_; | 180 std::string code_; |
177 | 181 |
178 // Pending code type. | 182 // Pending code type. |
179 SimUnlockCode code_type_; | 183 SimUnlockCode code_type_; |
180 | 184 |
181 DISALLOW_COPY_AND_ASSIGN(TaskProxy); | 185 DISALLOW_COPY_AND_ASSIGN(TaskProxy); |
182 }; | 186 }; |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 SimUnlockHandler* handler = new SimUnlockHandler(); | 673 SimUnlockHandler* handler = new SimUnlockHandler(); |
670 web_ui->AddMessageHandler(handler); | 674 web_ui->AddMessageHandler(handler); |
671 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); | 675 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); |
672 | 676 |
673 // Set up the chrome://sim-unlock/ source. | 677 // Set up the chrome://sim-unlock/ source. |
674 Profile* profile = Profile::FromWebUI(web_ui); | 678 Profile* profile = Profile::FromWebUI(web_ui); |
675 ChromeURLDataManager::AddDataSource(profile, html_source); | 679 ChromeURLDataManager::AddDataSource(profile, html_source); |
676 } | 680 } |
677 | 681 |
678 } // namespace chromeos | 682 } // namespace chromeos |
OLD | NEW |