| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 { "mouselock_block", IDS_MOUSE_LOCK_BLOCK_RADIO }, | 276 { "mouselock_block", IDS_MOUSE_LOCK_BLOCK_RADIO }, |
| 277 }; | 277 }; |
| 278 | 278 |
| 279 RegisterStrings(localized_strings, resources, arraysize(resources)); | 279 RegisterStrings(localized_strings, resources, arraysize(resources)); |
| 280 RegisterTitle(localized_strings, "contentSettingsPage", | 280 RegisterTitle(localized_strings, "contentSettingsPage", |
| 281 IDS_CONTENT_SETTINGS_TITLE); | 281 IDS_CONTENT_SETTINGS_TITLE); |
| 282 localized_strings->SetBoolean("enable_web_intents", | 282 localized_strings->SetBoolean("enable_web_intents", |
| 283 web_intents::IsWebIntentsEnabled()); | 283 web_intents::IsWebIntentsEnabled()); |
| 284 } | 284 } |
| 285 | 285 |
| 286 void ContentSettingsHandler::Initialize() { | 286 void ContentSettingsHandler::InitializeHandler() { |
| 287 notification_registrar_.Add( | 287 notification_registrar_.Add( |
| 288 this, chrome::NOTIFICATION_PROFILE_CREATED, | 288 this, chrome::NOTIFICATION_PROFILE_CREATED, |
| 289 content::NotificationService::AllSources()); | 289 content::NotificationService::AllSources()); |
| 290 notification_registrar_.Add( | 290 notification_registrar_.Add( |
| 291 this, chrome::NOTIFICATION_PROFILE_DESTROYED, | 291 this, chrome::NOTIFICATION_PROFILE_DESTROYED, |
| 292 content::NotificationService::AllSources()); | 292 content::NotificationService::AllSources()); |
| 293 | 293 |
| 294 UpdateHandlersEnabledRadios(); | 294 UpdateHandlersEnabledRadios(); |
| 295 UpdateAllExceptionsViewsFromModel(); | 295 UpdateAllExceptionsViewsFromModel(); |
| 296 notification_registrar_.Add( | 296 notification_registrar_.Add( |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 return Profile::FromWebUI(web_ui())->GetProtocolHandlerRegistry(); | 892 return Profile::FromWebUI(web_ui())->GetProtocolHandlerRegistry(); |
| 893 } | 893 } |
| 894 | 894 |
| 895 HostContentSettingsMap* | 895 HostContentSettingsMap* |
| 896 ContentSettingsHandler::GetOTRContentSettingsMap() { | 896 ContentSettingsHandler::GetOTRContentSettingsMap() { |
| 897 Profile* profile = Profile::FromWebUI(web_ui()); | 897 Profile* profile = Profile::FromWebUI(web_ui()); |
| 898 if (profile->HasOffTheRecordProfile()) | 898 if (profile->HasOffTheRecordProfile()) |
| 899 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); | 899 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); |
| 900 return NULL; | 900 return NULL; |
| 901 } | 901 } |
| OLD | NEW |