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/ui/webui/options/content_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 { "mouselock_tab_label", IDS_MOUSE_LOCK_TAB_LABEL }, | 271 { "mouselock_tab_label", IDS_MOUSE_LOCK_TAB_LABEL }, |
272 { "mouselock_header", IDS_MOUSE_LOCK_HEADER }, | 272 { "mouselock_header", IDS_MOUSE_LOCK_HEADER }, |
273 { "mouselock_allow", IDS_MOUSE_LOCK_ALLOW_RADIO }, | 273 { "mouselock_allow", IDS_MOUSE_LOCK_ALLOW_RADIO }, |
274 { "mouselock_ask", IDS_MOUSE_LOCK_ASK_RADIO }, | 274 { "mouselock_ask", IDS_MOUSE_LOCK_ASK_RADIO }, |
275 { "mouselock_block", IDS_MOUSE_LOCK_BLOCK_RADIO }, | 275 { "mouselock_block", IDS_MOUSE_LOCK_BLOCK_RADIO }, |
276 }; | 276 }; |
277 | 277 |
278 RegisterStrings(localized_strings, resources, arraysize(resources)); | 278 RegisterStrings(localized_strings, resources, arraysize(resources)); |
279 RegisterTitle(localized_strings, "contentSettingsPage", | 279 RegisterTitle(localized_strings, "contentSettingsPage", |
280 IDS_CONTENT_SETTINGS_TITLE); | 280 IDS_CONTENT_SETTINGS_TITLE); |
281 localized_strings->SetBoolean("enable_click_to_play", | |
282 CommandLine::ForCurrentProcess()->HasSwitch( | |
283 switches::kEnableClickToPlay)); | |
284 localized_strings->SetBoolean("enable_web_intents", | 281 localized_strings->SetBoolean("enable_web_intents", |
285 CommandLine::ForCurrentProcess()->HasSwitch( | 282 CommandLine::ForCurrentProcess()->HasSwitch( |
286 switches::kEnableWebIntents)); | 283 switches::kEnableWebIntents)); |
287 } | 284 } |
288 | 285 |
289 void ContentSettingsHandler::Initialize() { | 286 void ContentSettingsHandler::Initialize() { |
290 notification_registrar_.Add( | 287 notification_registrar_.Add( |
291 this, chrome::NOTIFICATION_PROFILE_CREATED, | 288 this, chrome::NOTIFICATION_PROFILE_CREATED, |
292 content::NotificationService::AllSources()); | 289 content::NotificationService::AllSources()); |
293 notification_registrar_.Add( | 290 notification_registrar_.Add( |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 return Profile::FromWebUI(web_ui_)->GetProtocolHandlerRegistry(); | 865 return Profile::FromWebUI(web_ui_)->GetProtocolHandlerRegistry(); |
869 } | 866 } |
870 | 867 |
871 HostContentSettingsMap* | 868 HostContentSettingsMap* |
872 ContentSettingsHandler::GetOTRContentSettingsMap() { | 869 ContentSettingsHandler::GetOTRContentSettingsMap() { |
873 Profile* profile = Profile::FromWebUI(web_ui_); | 870 Profile* profile = Profile::FromWebUI(web_ui_); |
874 if (profile->HasOffTheRecordProfile()) | 871 if (profile->HasOffTheRecordProfile()) |
875 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); | 872 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); |
876 return NULL; | 873 return NULL; |
877 } | 874 } |
OLD | NEW |