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

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

Issue 10784009: screenshot disabling policy tests (Closed) Base URL: http://git.chromium.org/chromium/src.git@disable_screenshots
Patch Set: Tests Created 8 years, 5 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
Index: chrome/browser/automation/testing_automation_provider_chromeos.cc
diff --git a/chrome/browser/automation/testing_automation_provider_chromeos.cc b/chrome/browser/automation/testing_automation_provider_chromeos.cc
index 000677fc80e57fb1a11be389e342e0de3872166a..116c610dbee83c94d81621983afd9b216b121c2f 100644
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/automation/testing_automation_provider.h"
+#include "ash/accelerators/accelerator_controller.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "ash/system/tray/system_tray_delegate.h"
@@ -1450,6 +1451,23 @@ void TestingAutomationProvider::CaptureProfilePhoto(
window->Show();
}
+void TestingAutomationProvider::ApplyAshAccelerator(
+ base::DictionaryValue* args,
+ IPC::Message* reply_message) {
+ int action;
+ AutomationJSONReply reply(this, reply_message);
+ if (!args->GetInteger("action", &action))
+ reply.SendError("Invalid or missing args.");
+
+ bool handled =
+ ash::Shell::GetInstance()->accelerator_controller()->PerformAction(
+ action, ui::Accelerator());
+
+ DictionaryValue result;
+ result.SetBoolean("handled", handled);
+ reply.SendSuccess(&result);
+}
+
void TestingAutomationProvider::AddChromeosObservers() {
power_manager_observer_ = new PowerManagerClientObserverForTesting;
chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->

Powered by Google App Engine
This is Rietveld 408576698