Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 1412523003: Adding <keygen> Content Setting (UI) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing page action. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 #endif 334 #endif
335 335
336 if (type == CONTENT_SETTINGS_TYPE_KEYGEN) {
337 HostContentSettingsMap* map = HostContentSettingsMapFactory::GetForProfile(
338 Profile::FromBrowserContext(web_contents()->GetBrowserContext()));
339 map->SetShouldDisplay(web_contents()->GetLastCommittedURL(), type);
340 }
341
336 if (type == CONTENT_SETTINGS_TYPE_PLUGINS && !details.empty() && 342 if (type == CONTENT_SETTINGS_TYPE_PLUGINS && !details.empty() &&
337 std::find(blocked_plugin_names_.begin(), blocked_plugin_names_.end(), 343 std::find(blocked_plugin_names_.begin(), blocked_plugin_names_.end(),
338 details) == blocked_plugin_names_.end()) { 344 details) == blocked_plugin_names_.end()) {
339 blocked_plugin_names_.push_back(details); 345 blocked_plugin_names_.push_back(details);
340 } 346 }
341 347
342 if (!status.blocked) { 348 if (!status.blocked) {
343 status.blocked = true; 349 status.blocked = true;
344 // TODO: it would be nice to have a way of mocking this in tests. 350 // TODO: it would be nice to have a way of mocking this in tests.
345 content::NotificationService::current()->Notify( 351 content::NotificationService::current()->Notify(
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 static_cast<MicrophoneCameraStateFlags>( 866 static_cast<MicrophoneCameraStateFlags>(
861 TabSpecificContentSettings::MICROPHONE_ACCESSED | 867 TabSpecificContentSettings::MICROPHONE_ACCESSED |
862 TabSpecificContentSettings::MICROPHONE_BLOCKED | 868 TabSpecificContentSettings::MICROPHONE_BLOCKED |
863 TabSpecificContentSettings::CAMERA_ACCESSED | 869 TabSpecificContentSettings::CAMERA_ACCESSED |
864 TabSpecificContentSettings::CAMERA_BLOCKED); 870 TabSpecificContentSettings::CAMERA_BLOCKED);
865 OnMediaStreamPermissionSet( 871 OnMediaStreamPermissionSet(
866 web_contents()->GetLastCommittedURL(), 872 web_contents()->GetLastCommittedURL(),
867 media_blocked, 873 media_blocked,
868 std::string(), std::string(), std::string(), std::string()); 874 std::string(), std::string(), std::string(), std::string());
869 } 875 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698