| Index: chrome/test/chromedriver/chrome/chrome_impl.cc
|
| diff --git a/chrome/test/chromedriver/chrome/chrome_impl.cc b/chrome/test/chromedriver/chrome/chrome_impl.cc
|
| index da448a3c9cebc2b05fe4cf994252c974d0095c34..c23a7dc350bcbb38293424010f1eeea4e13783f4 100644
|
| --- a/chrome/test/chromedriver/chrome/chrome_impl.cc
|
| +++ b/chrome/test/chromedriver/chrome/chrome_impl.cc
|
| @@ -5,15 +5,13 @@
|
| #include "chrome/test/chromedriver/chrome/chrome_impl.h"
|
|
|
| #include "chrome/test/chromedriver/chrome/devtools_client.h"
|
| +#include "chrome/test/chromedriver/chrome/devtools_event_listener.h"
|
| #include "chrome/test/chromedriver/chrome/devtools_http_client.h"
|
| -#include "chrome/test/chromedriver/chrome/javascript_dialog_manager.h"
|
| #include "chrome/test/chromedriver/chrome/log.h"
|
| #include "chrome/test/chromedriver/chrome/status.h"
|
| #include "chrome/test/chromedriver/chrome/web_view_impl.h"
|
|
|
| -ChromeImpl::~ChromeImpl() {
|
| - web_views_.clear();
|
| -}
|
| +ChromeImpl::~ChromeImpl() {}
|
|
|
| std::string ChromeImpl::GetVersion() {
|
| return version_;
|
| @@ -101,38 +99,6 @@ Status ChromeImpl::CloseWebView(const std::string& id) {
|
| return Status(kOk);
|
| }
|
|
|
| -Status ChromeImpl::IsJavaScriptDialogOpen(bool* is_open) {
|
| - JavaScriptDialogManager* manager;
|
| - Status status = GetDialogManagerForOpenDialog(&manager);
|
| - if (status.IsError())
|
| - return status;
|
| - *is_open = manager != NULL;
|
| - return Status(kOk);
|
| -}
|
| -
|
| -Status ChromeImpl::GetJavaScriptDialogMessage(std::string* message) {
|
| - JavaScriptDialogManager* manager;
|
| - Status status = GetDialogManagerForOpenDialog(&manager);
|
| - if (status.IsError())
|
| - return status;
|
| - if (!manager)
|
| - return Status(kNoAlertOpen);
|
| -
|
| - return manager->GetDialogMessage(message);
|
| -}
|
| -
|
| -Status ChromeImpl::HandleJavaScriptDialog(bool accept,
|
| - const std::string* prompt_text) {
|
| - JavaScriptDialogManager* manager;
|
| - Status status = GetDialogManagerForOpenDialog(&manager);
|
| - if (status.IsError())
|
| - return status;
|
| - if (!manager)
|
| - return Status(kNoAlertOpen);
|
| -
|
| - return manager->HandleDialog(accept, prompt_text);
|
| -}
|
| -
|
| Status ChromeImpl::GetAutomationExtension(AutomationExtension** extension) {
|
| return Status(kUnknownError, "automation extension not supported");
|
| }
|
| @@ -149,25 +115,3 @@ ChromeImpl::ChromeImpl(
|
| build_no_(build_no) {
|
| devtools_event_listeners_.swap(devtools_event_listeners);
|
| }
|
| -
|
| -Status ChromeImpl::GetDialogManagerForOpenDialog(
|
| - JavaScriptDialogManager** manager) {
|
| - std::list<std::string> web_view_ids;
|
| - Status status = GetWebViewIds(&web_view_ids);
|
| - if (status.IsError())
|
| - return status;
|
| -
|
| - for (std::list<std::string>::const_iterator it = web_view_ids.begin();
|
| - it != web_view_ids.end(); ++it) {
|
| - WebView* web_view;
|
| - status = GetWebViewById(*it, &web_view);
|
| - if (status.IsError())
|
| - return status;
|
| - if (web_view->GetJavaScriptDialogManager()->IsDialogOpen()) {
|
| - *manager = web_view->GetJavaScriptDialogManager();
|
| - return Status(kOk);
|
| - }
|
| - }
|
| - *manager = NULL;
|
| - return Status(kOk);
|
| -}
|
|
|