Index: chrome/browser/automation/testing_automation_provider.cc |
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc |
index ac2622e8869fdd844728ef8de028281ea45ffb98..37956ed3892264a6f79e05e2110ba3b1c8d49ebc 100644 |
--- a/chrome/browser/automation/testing_automation_provider.cc |
+++ b/chrome/browser/automation/testing_automation_provider.cc |
@@ -255,6 +255,8 @@ void TestingAutomationProvider::OnMessageReceived( |
IPC_MESSAGE_HANDLER(AutomationMsg_GetCookies, GetCookies) |
IPC_MESSAGE_HANDLER(AutomationMsg_SetCookie, SetCookie) |
IPC_MESSAGE_HANDLER(AutomationMsg_DeleteCookie, DeleteCookie) |
+ IPC_MESSAGE_HANDLER(AutomationMsg_IsContentBlocked, IsContentBlocked) |
+ IPC_MESSAGE_HANDLER(AutomationMsg_IsContentAccessed, IsContentAccessed) |
IPC_MESSAGE_HANDLER(AutomationMsg_ShowCollectedCookiesDialog, |
ShowCollectedCookiesDialog) |
IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_NavigateToURL, NavigateToURL) |
@@ -575,6 +577,34 @@ void TestingAutomationProvider::DeleteCookie(const GURL& url, |
} |
} |
+void TestingAutomationProvider::IsContentBlocked( |
+ int handle, |
+ ContentSettingsType content_type, |
+ bool* is_blocked, |
+ bool* success) { |
+ *success = false; |
+ if (tab_tracker_->ContainsHandle(handle)) { |
+ TabSpecificContentSettings* content_settings = tab_tracker_-> |
+ GetResource(handle)->tab_contents()->GetTabSpecificContentSettings(); |
+ *is_blocked = content_settings->IsContentBlocked(content_type); |
+ *success = true; |
+ } |
+} |
+ |
+void TestingAutomationProvider::IsContentAccessed( |
+ int handle, |
+ ContentSettingsType content_type, |
+ bool* is_accessed, |
+ bool* success) { |
+ *success = false; |
+ if (tab_tracker_->ContainsHandle(handle)) { |
+ TabSpecificContentSettings* content_settings = tab_tracker_-> |
+ GetResource(handle)->tab_contents()->GetTabSpecificContentSettings(); |
+ *is_accessed = content_settings->IsContentAccessed(content_type); |
+ *success = true; |
+ } |
+} |
+ |
void TestingAutomationProvider::ShowCollectedCookiesDialog( |
int handle, bool* success) { |
*success = false; |