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

Side by Side Diff: chrome/browser/ui/prefs/prefs_tab_helper.cc

Issue 10384128: Quote WebPreferences in namespace webkit_glue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright 2012 Created 8 years, 7 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) 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/prefs/prefs_tab_helper.h" 5 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/prefs/overlay_user_pref_store.h" 10 #include "chrome/browser/prefs/overlay_user_pref_store.h"
11 #include "chrome/browser/prefs/pref_service.h" 11 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/renderer_preferences_util.h" 13 #include "chrome/browser/renderer_preferences_util.h"
14 #include "chrome/browser/themes/theme_service.h" 14 #include "chrome/browser/themes/theme_service.h"
15 #include "chrome/browser/themes/theme_service_factory.h" 15 #include "chrome/browser/themes/theme_service_factory.h"
16 #include "chrome/browser/ui/constrained_window_tab_helper.h" 16 #include "chrome/browser/ui/constrained_window_tab_helper.h"
17 #include "chrome/common/chrome_notification_types.h" 17 #include "chrome/common/chrome_notification_types.h"
18 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
19 #include "content/public/browser/notification_details.h" 19 #include "content/public/browser/notification_details.h"
20 #include "content/public/browser/notification_service.h" 20 #include "content/public/browser/notification_service.h"
21 #include "content/public/browser/render_view_host.h" 21 #include "content/public/browser/render_view_host.h"
22 #include "content/public/browser/render_view_host_delegate.h" 22 #include "content/public/browser/render_view_host_delegate.h"
23 #include "content/public/browser/web_contents.h" 23 #include "content/public/browser/web_contents.h"
24 #include "grit/locale_settings.h" 24 #include "grit/locale_settings.h"
25 #include "grit/platform_locale_settings.h" 25 #include "grit/platform_locale_settings.h"
26 #include "webkit/glue/webpreferences.h" 26 #include "webkit/glue/webpreferences.h"
27 27
28 using content::WebContents; 28 using content::WebContents;
29 using webkit_glue::WebPreferences;
29 30
30 namespace { 31 namespace {
31 32
32 static void RegisterFontsAndCharsetPrefs(PrefService* prefs) { 33 static void RegisterFontsAndCharsetPrefs(PrefService* prefs) {
33 WebPreferences pref_defaults; 34 WebPreferences pref_defaults;
34 35
35 prefs->RegisterLocalizedStringPref(prefs::kDefaultCharset, 36 prefs->RegisterLocalizedStringPref(prefs::kDefaultCharset,
36 IDS_DEFAULT_ENCODING, 37 IDS_DEFAULT_ENCODING,
37 PrefService::SYNCABLE_PREF); 38 PrefService::SYNCABLE_PREF);
38 prefs->RegisterLocalizedStringPref(prefs::kWebKitStandardFontFamily, 39 prefs->RegisterLocalizedStringPref(prefs::kWebKitStandardFontFamily,
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 499
499 void PrefsTabHelper::UpdateRendererPreferences() { 500 void PrefsTabHelper::UpdateRendererPreferences() {
500 renderer_preferences_util::UpdateFromSystemSettings( 501 renderer_preferences_util::UpdateFromSystemSettings(
501 web_contents_->GetMutableRendererPrefs(), GetProfile()); 502 web_contents_->GetMutableRendererPrefs(), GetProfile());
502 web_contents_->GetRenderViewHost()->SyncRendererPrefs(); 503 web_contents_->GetRenderViewHost()->SyncRendererPrefs();
503 } 504 }
504 505
505 Profile* PrefsTabHelper::GetProfile() { 506 Profile* PrefsTabHelper::GetProfile() {
506 return Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 507 return Profile::FromBrowserContext(web_contents_->GetBrowserContext());
507 } 508 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.h ('k') | chrome/browser/ui/webui/task_manager/task_manager_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698