| 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/content_settings/tab_specific_content_settings.h" | 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 324 |
| 325 #if defined(OS_ANDROID) | 325 #if defined(OS_ANDROID) |
| 326 if (type == CONTENT_SETTINGS_TYPE_POPUPS) { | 326 if (type == CONTENT_SETTINGS_TYPE_POPUPS) { |
| 327 // For Android we do not have a persistent button that will always be | 327 // For Android we do not have a persistent button that will always be |
| 328 // visible for blocked popups. Instead we have info bars which could be | 328 // visible for blocked popups. Instead we have info bars which could be |
| 329 // dismissed. Have to clear the blocked state so we properly notify the | 329 // dismissed. Have to clear the blocked state so we properly notify the |
| 330 // relevant pieces again. | 330 // relevant pieces again. |
| 331 status.blocked = false; | 331 status.blocked = false; |
| 332 status.blockage_indicated_to_user = false; | 332 status.blockage_indicated_to_user = false; |
| 333 } | 333 } |
| 334 |
| 335 if (type == CONTENT_SETTINGS_TYPE_KEYGEN) { |
| 336 HostContentSettingsMap* map = HostContentSettingsMapFactory::GetForProfile( |
| 337 Profile::FromBrowserContext(web_contents()->GetBrowserContext())); |
| 338 GURL url = web_contents()->GetLastCommittedURL(); |
| 339 map->SetNarrowestContentSetting(url, url, type, CONTENT_SETTING_ASK); |
| 340 } |
| 334 #endif | 341 #endif |
| 335 | 342 |
| 336 if (type == CONTENT_SETTINGS_TYPE_PLUGINS && !details.empty() && | 343 if (type == CONTENT_SETTINGS_TYPE_PLUGINS && !details.empty() && |
| 337 std::find(blocked_plugin_names_.begin(), blocked_plugin_names_.end(), | 344 std::find(blocked_plugin_names_.begin(), blocked_plugin_names_.end(), |
| 338 details) == blocked_plugin_names_.end()) { | 345 details) == blocked_plugin_names_.end()) { |
| 339 blocked_plugin_names_.push_back(details); | 346 blocked_plugin_names_.push_back(details); |
| 340 } | 347 } |
| 341 | 348 |
| 342 if (!status.blocked) { | 349 if (!status.blocked) { |
| 343 status.blocked = true; | 350 status.blocked = true; |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 static_cast<MicrophoneCameraStateFlags>( | 867 static_cast<MicrophoneCameraStateFlags>( |
| 861 TabSpecificContentSettings::MICROPHONE_ACCESSED | | 868 TabSpecificContentSettings::MICROPHONE_ACCESSED | |
| 862 TabSpecificContentSettings::MICROPHONE_BLOCKED | | 869 TabSpecificContentSettings::MICROPHONE_BLOCKED | |
| 863 TabSpecificContentSettings::CAMERA_ACCESSED | | 870 TabSpecificContentSettings::CAMERA_ACCESSED | |
| 864 TabSpecificContentSettings::CAMERA_BLOCKED); | 871 TabSpecificContentSettings::CAMERA_BLOCKED); |
| 865 OnMediaStreamPermissionSet( | 872 OnMediaStreamPermissionSet( |
| 866 web_contents()->GetLastCommittedURL(), | 873 web_contents()->GetLastCommittedURL(), |
| 867 media_blocked, | 874 media_blocked, |
| 868 std::string(), std::string(), std::string(), std::string()); | 875 std::string(), std::string(), std::string(), std::string()); |
| 869 } | 876 } |
| OLD | NEW |