Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: chrome/browser/ui/webui/chromeos/register_page_ui.cc

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/register_page_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/register_page_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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/string_piece.h" 13 #include "base/string_piece.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/chromeos/cros/cros_library.h" 17 #include "chrome/browser/chromeos/cros/cros_library.h"
18 #include "chrome/browser/chromeos/cros/network_library.h" 18 #include "chrome/browser/chromeos/cros/network_library.h"
19 #include "chrome/browser/chromeos/customization_document.h" 19 #include "chrome/browser/chromeos/customization_document.h"
20 #include "chrome/browser/chromeos/login/wizard_controller.h" 20 #include "chrome/browser/chromeos/login/wizard_controller.h"
21 #include "chrome/browser/chromeos/system/runtime_environment.h" 21 #include "chrome/browser/chromeos/system/runtime_environment.h"
22 #include "chrome/browser/chromeos/system/statistics_provider.h" 22 #include "chrome/browser/chromeos/system/statistics_provider.h"
23 #include "chrome/browser/chromeos/version_loader.h" 23 #include "chrome/browser/chromeos/version_loader.h"
24 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 25 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
26 #include "chrome/common/url_constants.h" 26 #include "chrome/common/url_constants.h"
27 #include "content/public/browser/browser_thread.h" 27 #include "content/public/browser/browser_thread.h"
28 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
29 #include "content/public/browser/web_ui_message_handler.h"
29 #include "googleurl/src/gurl.h" 30 #include "googleurl/src/gurl.h"
30 #include "grit/browser_resources.h" 31 #include "grit/browser_resources.h"
31 #include "ui/base/resource/resource_bundle.h" 32 #include "ui/base/resource/resource_bundle.h"
32 33
33 using content::WebContents; 34 using content::WebContents;
35 using content::WebUIMessageHandler;
34 36
35 namespace { 37 namespace {
36 38
37 // Host page JS API callback names. 39 // Host page JS API callback names.
38 const char kJsCallbackGetRegistrationUrl[] = "getRegistrationUrl"; 40 const char kJsCallbackGetRegistrationUrl[] = "getRegistrationUrl";
39 const char kJsCallbackUserInfo[] = "getUserInfo"; 41 const char kJsCallbackUserInfo[] = "getUserInfo";
40 42
41 // Host page JS API function names. 43 // Host page JS API function names.
42 const char kJsApiSetRegistrationUrl[] = "setRegistrationUrl"; 44 const char kJsApiSetRegistrationUrl[] = "setRegistrationUrl";
43 const char kJsApiSetUserInfo[] = "setUserInfo"; 45 const char kJsApiSetUserInfo[] = "setUserInfo";
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 296
295 RegisterPageUI::RegisterPageUI(WebContents* contents) : ChromeWebUI(contents) { 297 RegisterPageUI::RegisterPageUI(WebContents* contents) : ChromeWebUI(contents) {
296 RegisterPageHandler* handler = new RegisterPageHandler(); 298 RegisterPageHandler* handler = new RegisterPageHandler();
297 AddMessageHandler(handler); 299 AddMessageHandler(handler);
298 RegisterPageUIHTMLSource* html_source = new RegisterPageUIHTMLSource(); 300 RegisterPageUIHTMLSource* html_source = new RegisterPageUIHTMLSource();
299 301
300 // Set up the chrome://register/ source. 302 // Set up the chrome://register/ source.
301 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); 303 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
302 profile->GetChromeURLDataManager()->AddDataSource(html_source); 304 profile->GetChromeURLDataManager()->AddDataSource(html_source);
303 } 305 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc ('k') | chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698