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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 { "mouselock_allow", IDS_MOUSE_LOCK_ALLOW_RADIO }, | 280 { "mouselock_allow", IDS_MOUSE_LOCK_ALLOW_RADIO }, |
281 { "mouselock_ask", IDS_MOUSE_LOCK_ASK_RADIO }, | 281 { "mouselock_ask", IDS_MOUSE_LOCK_ASK_RADIO }, |
282 { "mouselock_block", IDS_MOUSE_LOCK_BLOCK_RADIO }, | 282 { "mouselock_block", IDS_MOUSE_LOCK_BLOCK_RADIO }, |
283 }; | 283 }; |
284 | 284 |
285 RegisterStrings(localized_strings, resources, arraysize(resources)); | 285 RegisterStrings(localized_strings, resources, arraysize(resources)); |
286 RegisterTitle(localized_strings, "contentSettingsPage", | 286 RegisterTitle(localized_strings, "contentSettingsPage", |
287 IDS_CONTENT_SETTINGS_TITLE); | 287 IDS_CONTENT_SETTINGS_TITLE); |
288 localized_strings->SetBoolean("enable_web_intents", | 288 localized_strings->SetBoolean("enable_web_intents", |
289 web_intents::IsWebIntentsEnabled()); | 289 web_intents::IsWebIntentsEnabled()); |
| 290 // TODO(marja): clean up the options UI after the decision on the session |
| 291 // restore changes has stabilized. |
290 localized_strings->SetBoolean( | 292 localized_strings->SetBoolean( |
291 "enable_restore_session_state", | 293 "enable_restore_session_state", false); |
292 !CommandLine::ForCurrentProcess()->HasSwitch( | |
293 switches::kDisableRestoreSessionState)); | |
294 } | 294 } |
295 | 295 |
296 void ContentSettingsHandler::InitializeHandler() { | 296 void ContentSettingsHandler::InitializeHandler() { |
297 notification_registrar_.Add( | 297 notification_registrar_.Add( |
298 this, chrome::NOTIFICATION_PROFILE_CREATED, | 298 this, chrome::NOTIFICATION_PROFILE_CREATED, |
299 content::NotificationService::AllSources()); | 299 content::NotificationService::AllSources()); |
300 notification_registrar_.Add( | 300 notification_registrar_.Add( |
301 this, chrome::NOTIFICATION_PROFILE_DESTROYED, | 301 this, chrome::NOTIFICATION_PROFILE_DESTROYED, |
302 content::NotificationService::AllSources()); | 302 content::NotificationService::AllSources()); |
303 | 303 |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 | 917 |
918 HostContentSettingsMap* | 918 HostContentSettingsMap* |
919 ContentSettingsHandler::GetOTRContentSettingsMap() { | 919 ContentSettingsHandler::GetOTRContentSettingsMap() { |
920 Profile* profile = Profile::FromWebUI(web_ui()); | 920 Profile* profile = Profile::FromWebUI(web_ui()); |
921 if (profile->HasOffTheRecordProfile()) | 921 if (profile->HasOffTheRecordProfile()) |
922 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); | 922 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); |
923 return NULL; | 923 return NULL; |
924 } | 924 } |
925 | 925 |
926 } // namespace options2 | 926 } // namespace options2 |
OLD | NEW |