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/mobile_setup_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/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 "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/ref_counted_memory.h" | 15 #include "base/memory/ref_counted_memory.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
19 #include "base/strings/string_piece.h" | 19 #include "base/strings/string_piece.h" |
20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
21 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
22 #include "base/values.h" | 22 #include "base/values.h" |
23 #include "chrome/browser/chromeos/mobile/mobile_activator.h" | 23 #include "chrome/browser/chromeos/mobile/mobile_activator.h" |
24 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/browser/ui/browser_list.h" | 25 #include "chrome/browser/ui/browser_list.h" |
26 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
27 #include "chrome/common/render_messages.h" | 27 #include "chrome/common/render_messages.h" |
28 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
| 29 #include "chrome/grit/generated_resources.h" |
29 #include "chromeos/network/device_state.h" | 30 #include "chromeos/network/device_state.h" |
30 #include "chromeos/network/network_configuration_handler.h" | 31 #include "chromeos/network/network_configuration_handler.h" |
31 #include "chromeos/network/network_event_log.h" | 32 #include "chromeos/network/network_event_log.h" |
32 #include "chromeos/network/network_state.h" | 33 #include "chromeos/network/network_state.h" |
33 #include "chromeos/network/network_state_handler.h" | 34 #include "chromeos/network/network_state_handler.h" |
34 #include "chromeos/network/network_state_handler_observer.h" | 35 #include "chromeos/network/network_state_handler_observer.h" |
35 #include "content/public/browser/browser_thread.h" | 36 #include "content/public/browser/browser_thread.h" |
36 #include "content/public/browser/render_frame_host.h" | 37 #include "content/public/browser/render_frame_host.h" |
37 #include "content/public/browser/url_data_source.h" | 38 #include "content/public/browser/url_data_source.h" |
38 #include "content/public/browser/web_contents.h" | 39 #include "content/public/browser/web_contents.h" |
39 #include "content/public/browser/web_ui.h" | 40 #include "content/public/browser/web_ui.h" |
40 #include "content/public/browser/web_ui_message_handler.h" | 41 #include "content/public/browser/web_ui_message_handler.h" |
41 #include "grit/browser_resources.h" | 42 #include "grit/browser_resources.h" |
42 #include "grit/generated_resources.h" | |
43 #include "grit/locale_settings.h" | 43 #include "grit/locale_settings.h" |
44 #include "third_party/cros_system_api/dbus/service_constants.h" | 44 #include "third_party/cros_system_api/dbus/service_constants.h" |
45 #include "ui/base/l10n/l10n_util.h" | 45 #include "ui/base/l10n/l10n_util.h" |
46 #include "ui/base/resource/resource_bundle.h" | 46 #include "ui/base/resource/resource_bundle.h" |
47 #include "ui/base/webui/jstemplate_builder.h" | 47 #include "ui/base/webui/jstemplate_builder.h" |
48 #include "ui/base/webui/web_ui_util.h" | 48 #include "ui/base/webui/web_ui_util.h" |
49 #include "url/gurl.h" | 49 #include "url/gurl.h" |
50 | 50 |
51 using chromeos::MobileActivator; | 51 using chromeos::MobileActivator; |
52 using chromeos::NetworkHandler; | 52 using chromeos::NetworkHandler; |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 const GURL& validated_url, | 650 const GURL& validated_url, |
651 int error_code, | 651 int error_code, |
652 const base::string16& error_description) { | 652 const base::string16& error_description) { |
653 if (render_frame_host->GetFrameName() != "paymentForm") | 653 if (render_frame_host->GetFrameName() != "paymentForm") |
654 return; | 654 return; |
655 | 655 |
656 base::FundamentalValue result_value(-error_code); | 656 base::FundamentalValue result_value(-error_code); |
657 web_ui()->CallJavascriptFunction(kJsPortalFrameLoadFailedCallback, | 657 web_ui()->CallJavascriptFunction(kJsPortalFrameLoadFailedCallback, |
658 result_value); | 658 result_value); |
659 } | 659 } |
OLD | NEW |