| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/test/chromedriver/session_commands.h" | 5 #include "chrome/test/chromedriver/session_commands.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 Status status = session->GetTargetWindow(&web_view); | 451 Status status = session->GetTargetWindow(&web_view); |
| 452 if (status.IsError()) | 452 if (status.IsError()) |
| 453 return status; | 453 return status; |
| 454 | 454 |
| 455 status = web_view->ConnectIfNecessary(); | 455 status = web_view->ConnectIfNecessary(); |
| 456 if (status.IsError()) | 456 if (status.IsError()) |
| 457 return status; | 457 return status; |
| 458 | 458 |
| 459 bool is_pending; | 459 bool is_pending; |
| 460 status = web_view->IsPendingNavigation( | 460 status = web_view->IsPendingNavigation( |
| 461 session->GetCurrentFrameId(), &is_pending); | 461 session->GetCurrentFrameId(), nullptr, &is_pending); |
| 462 if (status.IsError()) | 462 if (status.IsError()) |
| 463 return status; | 463 return status; |
| 464 value->reset(new base::FundamentalValue(is_pending)); | 464 value->reset(new base::FundamentalValue(is_pending)); |
| 465 return Status(kOk); | 465 return Status(kOk); |
| 466 } | 466 } |
| 467 | 467 |
| 468 Status ExecuteGetLocation(Session* session, | 468 Status ExecuteGetLocation(Session* session, |
| 469 const base::DictionaryValue& params, | 469 const base::DictionaryValue& params, |
| 470 std::unique_ptr<base::Value>* value) { | 470 std::unique_ptr<base::Value>* value) { |
| 471 if (!session->overridden_geoposition) { | 471 if (!session->overridden_geoposition) { |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 687 |
| 688 Status ExecuteSetAutoReporting(Session* session, | 688 Status ExecuteSetAutoReporting(Session* session, |
| 689 const base::DictionaryValue& params, | 689 const base::DictionaryValue& params, |
| 690 std::unique_ptr<base::Value>* value) { | 690 std::unique_ptr<base::Value>* value) { |
| 691 bool enabled; | 691 bool enabled; |
| 692 if (!params.GetBoolean("enabled", &enabled)) | 692 if (!params.GetBoolean("enabled", &enabled)) |
| 693 return Status(kUnknownError, "missing parameter 'enabled'"); | 693 return Status(kUnknownError, "missing parameter 'enabled'"); |
| 694 session->auto_reporting_enabled = enabled; | 694 session->auto_reporting_enabled = enabled; |
| 695 return Status(kOk); | 695 return Status(kOk); |
| 696 } | 696 } |
| OLD | NEW |