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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 3539002: Add UI test for click-to-play. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: move message declaration to bottom of file Created 10 years, 2 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 | « chrome/browser/automation/testing_automation_provider.h ('k') | chrome/renderer/blocked_plugin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 109c13b0a22b968b83851312ab9a0f3fe72a0a65..e4e1d539e1308ea7055e465bc3ca34580cbeea5a 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -419,6 +419,7 @@ void TestingAutomationProvider::OnMessageReceived(
IPC_MESSAGE_HANDLER(AutomationMsg_ShutdownSessionService,
ShutdownSessionService)
IPC_MESSAGE_HANDLER(AutomationMsg_SetContentSetting, SetContentSetting)
+ IPC_MESSAGE_HANDLER(AutomationMsg_LoadBlockedPlugins, LoadBlockedPlugins)
IPC_MESSAGE_HANDLER(AutomationMsg_ResetToDefaultTheme, ResetToDefaultTheme)
IPC_MESSAGE_UNHANDLED(AutomationProvider::OnMessageReceived(message));
@@ -4052,6 +4053,21 @@ void TestingAutomationProvider::SetContentSetting(
}
}
+void TestingAutomationProvider::LoadBlockedPlugins(int tab_handle,
+ bool* success) {
+ *success = false;
+ if (tab_tracker_->ContainsHandle(tab_handle)) {
+ NavigationController* nav = tab_tracker_->GetResource(tab_handle);
+ if (!nav)
+ return;
+ TabContents* contents = nav->tab_contents();
+ if (!contents)
+ return;
+ contents->render_view_host()->LoadBlockedPlugins();
+ *success = true;
+ }
+}
+
void TestingAutomationProvider::ResetToDefaultTheme() {
profile_->ClearTheme();
}
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.h ('k') | chrome/renderer/blocked_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698