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 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/logging.h" // For CHECK macros. | 10 #include "base/logging.h" // For CHECK macros. |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/test/chromedriver/basic_types.h" | 14 #include "chrome/test/chromedriver/basic_types.h" |
15 #include "chrome/test/chromedriver/chrome.h" | 15 #include "chrome/test/chromedriver/chrome/chrome.h" |
| 16 #include "chrome/test/chromedriver/chrome/status.h" |
| 17 #include "chrome/test/chromedriver/chrome/web_view.h" |
16 #include "chrome/test/chromedriver/session.h" | 18 #include "chrome/test/chromedriver/session.h" |
17 #include "chrome/test/chromedriver/session_map.h" | 19 #include "chrome/test/chromedriver/session_map.h" |
18 #include "chrome/test/chromedriver/status.h" | |
19 #include "chrome/test/chromedriver/web_view.h" | |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 const char kWindowHandlePrefix[] = "CDwindow-"; | 23 const char kWindowHandlePrefix[] = "CDwindow-"; |
24 | 24 |
25 std::string WebViewIdToWindowHandle(const std::string& web_view_id) { | 25 std::string WebViewIdToWindowHandle(const std::string& web_view_id) { |
26 return kWindowHandlePrefix + web_view_id; | 26 return kWindowHandlePrefix + web_view_id; |
27 } | 27 } |
28 | 28 |
29 bool WindowHandleToWebViewId(const std::string& window_handle, | 29 bool WindowHandleToWebViewId(const std::string& window_handle, |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 return status; | 281 return status; |
282 | 282 |
283 bool is_pending; | 283 bool is_pending; |
284 status = web_view->IsPendingNavigation( | 284 status = web_view->IsPendingNavigation( |
285 session->GetCurrentFrameId(), &is_pending); | 285 session->GetCurrentFrameId(), &is_pending); |
286 if (status.IsError()) | 286 if (status.IsError()) |
287 return status; | 287 return status; |
288 value->reset(new base::FundamentalValue(is_pending)); | 288 value->reset(new base::FundamentalValue(is_pending)); |
289 return Status(kOk); | 289 return Status(kOk); |
290 } | 290 } |
OLD | NEW |