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

Side by Side Diff: chrome/browser/dom_ui/advanced_options_handler.cc

Issue 3108018: Display a banner above each panel that contains managed options.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/advanced_options_handler.h" 5 #include "chrome/browser/dom_ui/advanced_options_handler.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/dom_ui/options_managed_banner_handler.h"
11 #include "chrome/browser/download/download_manager.h" 12 #include "chrome/browser/download/download_manager.h"
12 #include "chrome/browser/metrics/user_metrics.h" 13 #include "chrome/browser/metrics/user_metrics.h"
13 #include "chrome/browser/pref_service.h" 14 #include "chrome/browser/pref_service.h"
14 #include "chrome/browser/profile.h" 15 #include "chrome/browser/profile.h"
16 #include "chrome/browser/options_window.h"
15 #include "chrome/browser/tab_contents/tab_contents.h" 17 #include "chrome/browser/tab_contents/tab_contents.h"
16 #include "chrome/browser/tab_contents/tab_contents_view.h" 18 #include "chrome/browser/tab_contents/tab_contents_view.h"
17 #include "chrome/common/notification_service.h" 19 #include "chrome/common/notification_service.h"
18 #include "chrome/common/notification_type.h" 20 #include "chrome/common/notification_type.h"
19 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
20 #include "grit/chromium_strings.h" 22 #include "grit/chromium_strings.h"
21 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
22 #include "grit/locale_settings.h" 24 #include "grit/locale_settings.h"
23 25
24 #if !defined(OS_CHROMEOS) 26 #if !defined(OS_CHROMEOS)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 l10n_util::GetStringUTF16(IDS_OPTIONS_DISABLE_SERVICES)); 123 l10n_util::GetStringUTF16(IDS_OPTIONS_DISABLE_SERVICES));
122 } 124 }
123 125
124 void AdvancedOptionsHandler::Initialize() { 126 void AdvancedOptionsHandler::Initialize() {
125 SetupDownloadLocationPath(); 127 SetupDownloadLocationPath();
126 SetupAutoOpenFileTypesDisabledAttribute(); 128 SetupAutoOpenFileTypesDisabledAttribute();
127 SetupProxySettingsDisabledAttribute(); 129 SetupProxySettingsDisabledAttribute();
128 #if defined(OS_WIN) 130 #if defined(OS_WIN)
129 SetupSSLConfigSettings(); 131 SetupSSLConfigSettings();
130 #endif 132 #endif
133 banner_handler_.reset(
134 new OptionsManagedBannerHandler(dom_ui_,
135 ASCIIToUTF16("AdvancedOptions"),
136 OPTIONS_PAGE_ADVANCED));
131 } 137 }
132 138
133 DOMMessageHandler* AdvancedOptionsHandler::Attach(DOMUI* dom_ui) { 139 DOMMessageHandler* AdvancedOptionsHandler::Attach(DOMUI* dom_ui) {
134 // Call through to superclass. 140 // Call through to superclass.
135 DOMMessageHandler* handler = OptionsPageUIHandler::Attach(dom_ui); 141 DOMMessageHandler* handler = OptionsPageUIHandler::Attach(dom_ui);
136 142
137 // Register for preferences that we need to observe manually. These have 143 // Register for preferences that we need to observe manually. These have
138 // special behaviors that aren't handled by the standard prefs UI. 144 // special behaviors that aren't handled by the standard prefs UI.
139 DCHECK(dom_ui_); 145 DCHECK(dom_ui_);
140 PrefService* prefs = dom_ui_->GetProfile()->GetPrefs(); 146 PrefService* prefs = dom_ui_->GetProfile()->GetPrefs();
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 311 }
306 FundamentalValue checkRevocationValue(checkRevocationSetting); 312 FundamentalValue checkRevocationValue(checkRevocationSetting);
307 dom_ui_->CallJavascriptFunction( 313 dom_ui_->CallJavascriptFunction(
308 L"options.AdvancedOptions.SetCheckRevocationCheckboxState", 314 L"options.AdvancedOptions.SetCheckRevocationCheckboxState",
309 checkRevocationValue); 315 checkRevocationValue);
310 FundamentalValue useSSLValue(useSSLSetting); 316 FundamentalValue useSSLValue(useSSLSetting);
311 dom_ui_->CallJavascriptFunction( 317 dom_ui_->CallJavascriptFunction(
312 L"options.AdvancedOptions.SetUseSSL2CheckboxStatechecked", useSSLValue); 318 L"options.AdvancedOptions.SetUseSSL2CheckboxStatechecked", useSSLValue);
313 } 319 }
314 #endif 320 #endif
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/advanced_options_handler.h ('k') | chrome/browser/dom_ui/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698