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

Side by Side Diff: chrome/browser/ui/webui/flags_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/flags_ui.h" 5 #include "chrome/browser/ui/webui/flags_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/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/about_flags.h" 13 #include "chrome/browser/about_flags.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/prefs/pref_service.h" 15 #include "chrome/browser/prefs/pref_service.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/ui/browser_list.h" 17 #include "chrome/browser/ui/browser_list.h"
18 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" 18 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
19 #include "chrome/common/pref_names.h" 19 #include "chrome/common/pref_names.h"
20 #include "chrome/common/url_constants.h" 20 #include "chrome/common/url_constants.h"
21 #include "content/public/browser/web_contents.h" 21 #include "content/public/browser/web_contents.h"
22 #include "content/public/browser/web_ui_message_handler.h"
22 #include "grit/browser_resources.h" 23 #include "grit/browser_resources.h"
23 #include "grit/chromium_strings.h" 24 #include "grit/chromium_strings.h"
24 #include "grit/generated_resources.h" 25 #include "grit/generated_resources.h"
25 #include "grit/theme_resources_standard.h" 26 #include "grit/theme_resources_standard.h"
26 #include "grit/theme_resources.h" 27 #include "grit/theme_resources.h"
27 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/base/resource/resource_bundle.h" 29 #include "ui/base/resource/resource_bundle.h"
29 30
30 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
31 #include "chrome/browser/chromeos/cros_settings.h" 32 #include "chrome/browser/chromeos/cros_settings.h"
32 #include "chrome/browser/chromeos/login/user_manager.h" 33 #include "chrome/browser/chromeos/login/user_manager.h"
33 #endif 34 #endif
34 35
35 using content::WebContents; 36 using content::WebContents;
37 using content::WebUIMessageHandler;
36 38
37 namespace { 39 namespace {
38 40
39 ChromeWebUIDataSource* CreateFlagsUIHTMLSource() { 41 ChromeWebUIDataSource* CreateFlagsUIHTMLSource() {
40 ChromeWebUIDataSource* source = 42 ChromeWebUIDataSource* source =
41 new ChromeWebUIDataSource(chrome::kChromeUIFlagsHost); 43 new ChromeWebUIDataSource(chrome::kChromeUIFlagsHost);
42 44
43 source->AddLocalizedString("flagsLongTitle", IDS_FLAGS_LONG_TITLE); 45 source->AddLocalizedString("flagsLongTitle", IDS_FLAGS_LONG_TITLE);
44 source->AddLocalizedString("flagsTableTitle", IDS_FLAGS_TABLE_TITLE); 46 source->AddLocalizedString("flagsTableTitle", IDS_FLAGS_TABLE_TITLE);
45 source->AddLocalizedString("flagsNoExperimentsAvailable", 47 source->AddLocalizedString("flagsNoExperimentsAvailable",
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // static 170 // static
169 RefCountedMemory* FlagsUI::GetFaviconResourceBytes() { 171 RefCountedMemory* FlagsUI::GetFaviconResourceBytes() {
170 return ResourceBundle::GetSharedInstance(). 172 return ResourceBundle::GetSharedInstance().
171 LoadDataResourceBytes(IDR_FLAGS); 173 LoadDataResourceBytes(IDR_FLAGS);
172 } 174 }
173 175
174 // static 176 // static
175 void FlagsUI::RegisterPrefs(PrefService* prefs) { 177 void FlagsUI::RegisterPrefs(PrefService* prefs) {
176 prefs->RegisterListPref(prefs::kEnabledLabsExperiments); 178 prefs->RegisterListPref(prefs::kEnabledLabsExperiments);
177 } 179 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/edit_search_engine_dialog_webui.cc ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698