| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/common/jstemplate_builder.h" | 21 #include "chrome/common/jstemplate_builder.h" |
| 22 #include "chrome/common/url_constants.h" | 22 #include "chrome/common/url_constants.h" |
| 23 #include "content/browser/tab_contents/tab_contents.h" | 23 #include "content/browser/tab_contents/tab_contents.h" |
| 24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
| 25 #include "content/public/browser/notification_service.h" | 25 #include "content/public/browser/notification_service.h" |
| 26 #include "grit/browser_resources.h" | 26 #include "grit/browser_resources.h" |
| 27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
| 28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
| 29 #include "ui/base/resource/resource_bundle.h" | 29 #include "ui/base/resource/resource_bundle.h" |
| 30 | 30 |
| 31 using content::BrowserThread; |
| 32 |
| 31 namespace { | 33 namespace { |
| 32 | 34 |
| 33 // JS API callbacks names. | 35 // JS API callbacks names. |
| 34 const char kJsApiCancel[] = "cancel"; | 36 const char kJsApiCancel[] = "cancel"; |
| 35 const char kJsApiChangePinCode[] = "changePinCode"; | 37 const char kJsApiChangePinCode[] = "changePinCode"; |
| 36 const char kJsApiEnterPinCode[] = "enterPinCode"; | 38 const char kJsApiEnterPinCode[] = "enterPinCode"; |
| 37 const char kJsApiEnterPukCode[] = "enterPukCode"; | 39 const char kJsApiEnterPukCode[] = "enterPukCode"; |
| 38 const char kJsApiProceedToPukInput[] = "proceedToPukInput"; | 40 const char kJsApiProceedToPukInput[] = "proceedToPukInput"; |
| 39 const char kJsApiSimStatusInitialize[] = "simStatusInitialize"; | 41 const char kJsApiSimStatusInitialize[] = "simStatusInitialize"; |
| 40 | 42 |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 AddMessageHandler((handler)->Attach(this)); | 678 AddMessageHandler((handler)->Attach(this)); |
| 677 handler->Init(contents); | 679 handler->Init(contents); |
| 678 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); | 680 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); |
| 679 | 681 |
| 680 // Set up the chrome://sim-unlock/ source. | 682 // Set up the chrome://sim-unlock/ source. |
| 681 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); | 683 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); |
| 682 profile->GetChromeURLDataManager()->AddDataSource(html_source); | 684 profile->GetChromeURLDataManager()->AddDataSource(html_source); |
| 683 } | 685 } |
| 684 | 686 |
| 685 } // namespace chromeos | 687 } // namespace chromeos |
| OLD | NEW |