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/options2/content_settings_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/content_settings_handler2.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 { "mouselock_tab_label", IDS_MOUSE_LOCK_TAB_LABEL }, | 275 { "mouselock_tab_label", IDS_MOUSE_LOCK_TAB_LABEL }, |
276 { "mouselock_header", IDS_MOUSE_LOCK_HEADER }, | 276 { "mouselock_header", IDS_MOUSE_LOCK_HEADER }, |
277 { "mouselock_allow", IDS_MOUSE_LOCK_ALLOW_RADIO }, | 277 { "mouselock_allow", IDS_MOUSE_LOCK_ALLOW_RADIO }, |
278 { "mouselock_ask", IDS_MOUSE_LOCK_ASK_RADIO }, | 278 { "mouselock_ask", IDS_MOUSE_LOCK_ASK_RADIO }, |
279 { "mouselock_block", IDS_MOUSE_LOCK_BLOCK_RADIO }, | 279 { "mouselock_block", IDS_MOUSE_LOCK_BLOCK_RADIO }, |
280 }; | 280 }; |
281 | 281 |
282 RegisterStrings(localized_strings, resources, arraysize(resources)); | 282 RegisterStrings(localized_strings, resources, arraysize(resources)); |
283 RegisterTitle(localized_strings, "contentSettingsPage", | 283 RegisterTitle(localized_strings, "contentSettingsPage", |
284 IDS_CONTENT_SETTINGS_TITLE); | 284 IDS_CONTENT_SETTINGS_TITLE); |
285 localized_strings->SetBoolean("enable_click_to_play", | |
286 CommandLine::ForCurrentProcess()->HasSwitch( | |
287 switches::kEnableClickToPlay)); | |
288 localized_strings->SetBoolean("enable_web_intents", | 285 localized_strings->SetBoolean("enable_web_intents", |
289 !CommandLine::ForCurrentProcess()->HasSwitch( | 286 !CommandLine::ForCurrentProcess()->HasSwitch( |
290 switches::kDisableWebIntents)); | 287 switches::kDisableWebIntents)); |
291 } | 288 } |
292 | 289 |
293 void ContentSettingsHandler::Initialize() { | 290 void ContentSettingsHandler::Initialize() { |
294 notification_registrar_.Add( | 291 notification_registrar_.Add( |
295 this, chrome::NOTIFICATION_PROFILE_CREATED, | 292 this, chrome::NOTIFICATION_PROFILE_CREATED, |
296 content::NotificationService::AllSources()); | 293 content::NotificationService::AllSources()); |
297 notification_registrar_.Add( | 294 notification_registrar_.Add( |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 | 870 |
874 HostContentSettingsMap* | 871 HostContentSettingsMap* |
875 ContentSettingsHandler::GetOTRContentSettingsMap() { | 872 ContentSettingsHandler::GetOTRContentSettingsMap() { |
876 Profile* profile = Profile::FromWebUI(web_ui()); | 873 Profile* profile = Profile::FromWebUI(web_ui()); |
877 if (profile->HasOffTheRecordProfile()) | 874 if (profile->HasOffTheRecordProfile()) |
878 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); | 875 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); |
879 return NULL; | 876 return NULL; |
880 } | 877 } |
881 | 878 |
882 } // namespace options2 | 879 } // namespace options2 |
OLD | NEW |