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/chromeos/webui/register_page_ui.h" | 5 #include "chrome/browser/chromeos/webui/register_page_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/string_piece.h" | 11 #include "base/string_piece.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "base/weak_ptr.h" | 14 #include "base/weak_ptr.h" |
15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/browser_thread.h" | |
17 #include "chrome/browser/chromeos/cros/cros_library.h" | 16 #include "chrome/browser/chromeos/cros/cros_library.h" |
18 #include "chrome/browser/chromeos/cros/network_library.h" | 17 #include "chrome/browser/chromeos/cros/network_library.h" |
19 #include "chrome/browser/chromeos/cros/system_library.h" | 18 #include "chrome/browser/chromeos/cros/system_library.h" |
20 #include "chrome/browser/chromeos/customization_document.h" | 19 #include "chrome/browser/chromeos/customization_document.h" |
21 #include "chrome/browser/chromeos/login/wizard_controller.h" | 20 #include "chrome/browser/chromeos/login/wizard_controller.h" |
22 #include "chrome/browser/chromeos/version_loader.h" | 21 #include "chrome/browser/chromeos/version_loader.h" |
23 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/tab_contents/tab_contents.h" | |
25 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 23 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
26 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 25 #include "content/browser/browser_thread.h" |
| 26 #include "content/browser/tab_contents/tab_contents.h" |
27 #include "googleurl/src/gurl.h" | 27 #include "googleurl/src/gurl.h" |
28 #include "grit/browser_resources.h" | 28 #include "grit/browser_resources.h" |
29 #include "ui/base/resource/resource_bundle.h" | 29 #include "ui/base/resource/resource_bundle.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // Host page JS API callback names. | 33 // Host page JS API callback names. |
34 const char kJsCallbackGetRegistrationUrl[] = "getRegistrationUrl"; | 34 const char kJsCallbackGetRegistrationUrl[] = "getRegistrationUrl"; |
35 const char kJsCallbackUserInfo[] = "getUserInfo"; | 35 const char kJsCallbackUserInfo[] = "getUserInfo"; |
36 | 36 |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 308 |
309 RegisterPageUI::RegisterPageUI(TabContents* contents) : WebUI(contents){ | 309 RegisterPageUI::RegisterPageUI(TabContents* contents) : WebUI(contents){ |
310 RegisterPageHandler* handler = new RegisterPageHandler(); | 310 RegisterPageHandler* handler = new RegisterPageHandler(); |
311 AddMessageHandler((handler)->Attach(this)); | 311 AddMessageHandler((handler)->Attach(this)); |
312 handler->Init(); | 312 handler->Init(); |
313 RegisterPageUIHTMLSource* html_source = new RegisterPageUIHTMLSource(); | 313 RegisterPageUIHTMLSource* html_source = new RegisterPageUIHTMLSource(); |
314 | 314 |
315 // Set up the chrome://register/ source. | 315 // Set up the chrome://register/ source. |
316 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); | 316 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
317 } | 317 } |
OLD | NEW |