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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 2614033004: Convert SetContentSettingRules to use mojo, part 2/2. (Closed)
Patch Set: Convert SetContentSettingRules to use mojo, part 2/2. Created 3 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/tab_specific_content_settings.cc
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 3c1c8a31fbde383194c5eccd411c1e0180c6db3b..70c1b17591f3f4b426d1f8fd3fe9ed7440c4a998 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -27,6 +27,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
+#include "chrome/common/renderer_configuration.mojom.h"
#include "components/content_settings/core/browser/content_settings_details.h"
#include "components/content_settings/core/browser/content_settings_info.h"
#include "components/content_settings/core/browser/content_settings_registry.h"
@@ -41,6 +42,7 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
@@ -763,8 +765,15 @@ void TabSpecificContentSettings::OnContentSettingChanged(
}
RendererContentSettingRules rules;
GetRendererContentSettingRules(map, &rules);
- // TODO(nigeltao): use Mojo instead of legacy IPC.
- Send(new ChromeViewMsg_SetContentSettingRules(rules));
+
+ IPC::ChannelProxy* channel =
+ web_contents()->GetRenderProcessHost()->GetChannel();
+ // channel might be NULL in tests.
+ if (channel) {
+ chrome::mojom::RendererConfigurationAssociatedPtr rc_interface;
+ channel->GetRemoteAssociatedInterface(&rc_interface);
+ rc_interface->SetContentSettingRules(rules);
+ }
}
}
« no previous file with comments | « no previous file | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698