OLD | NEW |
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/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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 { "mouselock_tab_label", IDS_MOUSE_LOCK_TAB_LABEL }, | 273 { "mouselock_tab_label", IDS_MOUSE_LOCK_TAB_LABEL }, |
274 { "mouselock_header", IDS_MOUSE_LOCK_HEADER }, | 274 { "mouselock_header", IDS_MOUSE_LOCK_HEADER }, |
275 { "mouselock_allow", IDS_MOUSE_LOCK_ALLOW_RADIO }, | 275 { "mouselock_allow", IDS_MOUSE_LOCK_ALLOW_RADIO }, |
276 { "mouselock_ask", IDS_MOUSE_LOCK_ASK_RADIO }, | 276 { "mouselock_ask", IDS_MOUSE_LOCK_ASK_RADIO }, |
277 { "mouselock_block", IDS_MOUSE_LOCK_BLOCK_RADIO }, | 277 { "mouselock_block", IDS_MOUSE_LOCK_BLOCK_RADIO }, |
278 }; | 278 }; |
279 | 279 |
280 RegisterStrings(localized_strings, resources, arraysize(resources)); | 280 RegisterStrings(localized_strings, resources, arraysize(resources)); |
281 RegisterTitle(localized_strings, "contentSettingsPage", | 281 RegisterTitle(localized_strings, "contentSettingsPage", |
282 IDS_CONTENT_SETTINGS_TITLE); | 282 IDS_CONTENT_SETTINGS_TITLE); |
283 localized_strings->SetBoolean("enable_click_to_play", | |
284 CommandLine::ForCurrentProcess()->HasSwitch( | |
285 switches::kEnableClickToPlay)); | |
286 localized_strings->SetBoolean("enable_web_intents", | 283 localized_strings->SetBoolean("enable_web_intents", |
287 !CommandLine::ForCurrentProcess()->HasSwitch( | 284 !CommandLine::ForCurrentProcess()->HasSwitch( |
288 switches::kDisableWebIntents)); | 285 switches::kDisableWebIntents)); |
289 } | 286 } |
290 | 287 |
291 void ContentSettingsHandler::Initialize() { | 288 void ContentSettingsHandler::Initialize() { |
292 notification_registrar_.Add( | 289 notification_registrar_.Add( |
293 this, chrome::NOTIFICATION_PROFILE_CREATED, | 290 this, chrome::NOTIFICATION_PROFILE_CREATED, |
294 content::NotificationService::AllSources()); | 291 content::NotificationService::AllSources()); |
295 notification_registrar_.Add( | 292 notification_registrar_.Add( |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 return Profile::FromWebUI(web_ui())->GetProtocolHandlerRegistry(); | 866 return Profile::FromWebUI(web_ui())->GetProtocolHandlerRegistry(); |
870 } | 867 } |
871 | 868 |
872 HostContentSettingsMap* | 869 HostContentSettingsMap* |
873 ContentSettingsHandler::GetOTRContentSettingsMap() { | 870 ContentSettingsHandler::GetOTRContentSettingsMap() { |
874 Profile* profile = Profile::FromWebUI(web_ui()); | 871 Profile* profile = Profile::FromWebUI(web_ui()); |
875 if (profile->HasOffTheRecordProfile()) | 872 if (profile->HasOffTheRecordProfile()) |
876 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); | 873 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); |
877 return NULL; | 874 return NULL; |
878 } | 875 } |
OLD | NEW |