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

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

Issue 2582203003: Convert SetContentSettingRules to use mojo, part 1/2. (Closed)
Patch Set: Created 4 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 ContentSetting setting = map->GetContentSetting(media_origin, 766 ContentSetting setting = map->GetContentSetting(media_origin,
767 media_origin, 767 media_origin,
768 content_type, 768 content_type,
769 std::string()); 769 std::string());
770 ContentSettingsStatus& status = content_settings_status_[content_type]; 770 ContentSettingsStatus& status = content_settings_status_[content_type];
771 status.allowed = setting == CONTENT_SETTING_ALLOW; 771 status.allowed = setting == CONTENT_SETTING_ALLOW;
772 status.blocked = setting == CONTENT_SETTING_BLOCK; 772 status.blocked = setting == CONTENT_SETTING_BLOCK;
773 } 773 }
774 RendererContentSettingRules rules; 774 RendererContentSettingRules rules;
775 GetRendererContentSettingRules(map, &rules); 775 GetRendererContentSettingRules(map, &rules);
776 // TODO(nigeltao): use Mojo instead of legacy IPC.
776 Send(new ChromeViewMsg_SetContentSettingRules(rules)); 777 Send(new ChromeViewMsg_SetContentSettingRules(rules));
777 } 778 }
778 } 779 }
779 780
780 void TabSpecificContentSettings::RenderFrameForInterstitialPageCreated( 781 void TabSpecificContentSettings::RenderFrameForInterstitialPageCreated(
781 content::RenderFrameHost* render_frame_host) { 782 content::RenderFrameHost* render_frame_host) {
782 // We want to tell the renderer-side code to ignore content settings for this 783 // We want to tell the renderer-side code to ignore content settings for this
783 // page. 784 // page.
784 render_frame_host->Send(new ChromeViewMsg_SetAsInterstitial( 785 render_frame_host->Send(new ChromeViewMsg_SetAsInterstitial(
785 render_frame_host->GetRoutingID())); 786 render_frame_host->GetRoutingID()));
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 static_cast<MicrophoneCameraStateFlags>( 911 static_cast<MicrophoneCameraStateFlags>(
911 TabSpecificContentSettings::MICROPHONE_ACCESSED | 912 TabSpecificContentSettings::MICROPHONE_ACCESSED |
912 TabSpecificContentSettings::MICROPHONE_BLOCKED | 913 TabSpecificContentSettings::MICROPHONE_BLOCKED |
913 TabSpecificContentSettings::CAMERA_ACCESSED | 914 TabSpecificContentSettings::CAMERA_ACCESSED |
914 TabSpecificContentSettings::CAMERA_BLOCKED); 915 TabSpecificContentSettings::CAMERA_BLOCKED);
915 OnMediaStreamPermissionSet( 916 OnMediaStreamPermissionSet(
916 web_contents()->GetLastCommittedURL(), 917 web_contents()->GetLastCommittedURL(),
917 media_blocked, 918 media_blocked,
918 std::string(), std::string(), std::string(), std::string()); 919 std::string(), std::string(), std::string(), std::string());
919 } 920 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698