| OLD | NEW |
| 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2010 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/chromeos/dom_ui/mobile_setup_ui.h" | 5 #include "chrome/browser/chromeos/dom_ui/mobile_setup_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
| 12 #include "app/resource_bundle.h" | |
| 13 #include "base/callback.h" | 12 #include "base/callback.h" |
| 14 #include "base/file_util.h" | 13 #include "base/file_util.h" |
| 15 #include "base/json/json_reader.h" | 14 #include "base/json/json_reader.h" |
| 16 #include "base/json/json_writer.h" | 15 #include "base/json/json_writer.h" |
| 17 #include "base/logging.h" | 16 #include "base/logging.h" |
| 18 #include "base/metrics/histogram.h" | 17 #include "base/metrics/histogram.h" |
| 19 #include "base/string_piece.h" | 18 #include "base/string_piece.h" |
| 20 #include "base/string_util.h" | 19 #include "base/string_util.h" |
| 21 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
| 22 #include "base/timer.h" | 21 #include "base/timer.h" |
| 23 #include "base/values.h" | 22 #include "base/values.h" |
| 24 #include "base/weak_ptr.h" | 23 #include "base/weak_ptr.h" |
| 25 #include "chrome/browser/browser_list.h" | 24 #include "chrome/browser/browser_list.h" |
| 26 #include "chrome/browser/browser_thread.h" | 25 #include "chrome/browser/browser_thread.h" |
| 27 #include "chrome/browser/chromeos/cros/cros_library.h" | 26 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 28 #include "chrome/browser/chromeos/cros/network_library.h" | 27 #include "chrome/browser/chromeos/cros/network_library.h" |
| 29 #include "chrome/browser/chromeos/cros/system_library.h" | 28 #include "chrome/browser/chromeos/cros/system_library.h" |
| 30 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 29 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
| 31 #include "chrome/browser/prefs/pref_service.h" | 30 #include "chrome/browser/prefs/pref_service.h" |
| 32 #include "chrome/browser/profiles/profile.h" | 31 #include "chrome/browser/profiles/profile.h" |
| 33 #include "chrome/browser/tab_contents/tab_contents.h" | 32 #include "chrome/browser/tab_contents/tab_contents.h" |
| 34 #include "chrome/common/jstemplate_builder.h" | 33 #include "chrome/common/jstemplate_builder.h" |
| 35 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
| 36 #include "chrome/common/url_constants.h" | 35 #include "chrome/common/url_constants.h" |
| 37 #include "googleurl/src/gurl.h" | 36 #include "googleurl/src/gurl.h" |
| 38 #include "grit/browser_resources.h" | 37 #include "grit/browser_resources.h" |
| 39 #include "grit/chromium_strings.h" | 38 #include "grit/chromium_strings.h" |
| 40 #include "grit/generated_resources.h" | 39 #include "grit/generated_resources.h" |
| 41 #include "grit/locale_settings.h" | 40 #include "grit/locale_settings.h" |
| 41 #include "ui/base/resource/resource_bundle.h" |
| 42 | 42 |
| 43 namespace { | 43 namespace { |
| 44 | 44 |
| 45 // Host page JS API function names. | 45 // Host page JS API function names. |
| 46 const char kJsApiStartActivation[] = "startActivation"; | 46 const char kJsApiStartActivation[] = "startActivation"; |
| 47 const char kJsApiSetTransactionStatus[] = "setTransactionStatus"; | 47 const char kJsApiSetTransactionStatus[] = "setTransactionStatus"; |
| 48 | 48 |
| 49 const wchar_t kJsDeviceStatusChangedHandler[] = | 49 const wchar_t kJsDeviceStatusChangedHandler[] = |
| 50 L"mobile.MobileSetup.deviceStateChanged"; | 50 L"mobile.MobileSetup.deviceStateChanged"; |
| 51 | 51 |
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1278 new MobileSetupUIHTMLSource(service_path); | 1278 new MobileSetupUIHTMLSource(service_path); |
| 1279 | 1279 |
| 1280 // Set up the chrome://mobilesetup/ source. | 1280 // Set up the chrome://mobilesetup/ source. |
| 1281 BrowserThread::PostTask( | 1281 BrowserThread::PostTask( |
| 1282 BrowserThread::IO, FROM_HERE, | 1282 BrowserThread::IO, FROM_HERE, |
| 1283 NewRunnableMethod( | 1283 NewRunnableMethod( |
| 1284 ChromeURLDataManager::GetInstance(), | 1284 ChromeURLDataManager::GetInstance(), |
| 1285 &ChromeURLDataManager::AddDataSource, | 1285 &ChromeURLDataManager::AddDataSource, |
| 1286 make_scoped_refptr(html_source))); | 1286 make_scoped_refptr(html_source))); |
| 1287 } | 1287 } |
| OLD | NEW |