OLD | NEW |
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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
6 | 6 |
7 #include "ash/new_window_delegate.h" | 7 #include "ash/new_window_delegate.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 "Unable to access ExistingUserController"); | 466 "Unable to access ExistingUserController"); |
467 return; | 467 return; |
468 } | 468 } |
469 chromeos::LoginDisplayHostImpl* webui_host = | 469 chromeos::LoginDisplayHostImpl* webui_host = |
470 static_cast<chromeos::LoginDisplayHostImpl*>( | 470 static_cast<chromeos::LoginDisplayHostImpl*>( |
471 controller->login_display_host()); | 471 controller->login_display_host()); |
472 content::WebContents* web_contents = | 472 content::WebContents* web_contents = |
473 webui_host->GetOobeUI()->web_ui()->GetWebContents(); | 473 webui_host->GetOobeUI()->web_ui()->GetWebContents(); |
474 | 474 |
475 new DomOperationMessageSender(this, reply_message, true); | 475 new DomOperationMessageSender(this, reply_message, true); |
476 ExecuteJavascriptInRenderViewFrame(ASCIIToUTF16(frame_xpath), | 476 ExecuteJavascriptInRenderViewFrame(base::ASCIIToUTF16(frame_xpath), |
477 ASCIIToUTF16(javascript), | 477 base::ASCIIToUTF16(javascript), |
478 reply_message, | 478 reply_message, |
479 web_contents->GetRenderViewHost()); | 479 web_contents->GetRenderViewHost()); |
480 } | 480 } |
481 | 481 |
482 void TestingAutomationProvider::EnableSpokenFeedback( | 482 void TestingAutomationProvider::EnableSpokenFeedback( |
483 base::DictionaryValue* args, IPC::Message* reply_message) { | 483 base::DictionaryValue* args, IPC::Message* reply_message) { |
484 AutomationJSONReply reply(this, reply_message); | 484 AutomationJSONReply reply(this, reply_message); |
485 scoped_ptr<base::DictionaryValue> return_value(new base::DictionaryValue); | 485 scoped_ptr<base::DictionaryValue> return_value(new base::DictionaryValue); |
486 bool enabled; | 486 bool enabled; |
487 if (!args->GetBoolean("enabled", &enabled)) { | 487 if (!args->GetBoolean("enabled", &enabled)) { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 | 606 |
607 void TestingAutomationProvider::AddChromeosObservers() { | 607 void TestingAutomationProvider::AddChromeosObservers() { |
608 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | 608 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
609 AddObserver(this); | 609 AddObserver(this); |
610 } | 610 } |
611 | 611 |
612 void TestingAutomationProvider::RemoveChromeosObservers() { | 612 void TestingAutomationProvider::RemoveChromeosObservers() { |
613 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | 613 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
614 RemoveObserver(this); | 614 RemoveObserver(this); |
615 } | 615 } |
OLD | NEW |