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

Side by Side Diff: chrome/test/chromedriver/web_view_impl.cc

Issue 12321057: [chromedriver] Implement reconnection to DevTools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/web_view_impl.h" 5 #include "chrome/test/chromedriver/web_view_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 client_(client), 96 client_(client),
97 delegate_(delegate), 97 delegate_(delegate),
98 closer_func_(closer_func) {} 98 closer_func_(closer_func) {}
99 99
100 WebViewImpl::~WebViewImpl() {} 100 WebViewImpl::~WebViewImpl() {}
101 101
102 std::string WebViewImpl::GetId() { 102 std::string WebViewImpl::GetId() {
103 return id_; 103 return id_;
104 } 104 }
105 105
106 Status WebViewImpl::ConnectIfNecessary() {
107 return client_->ConnectIfNecessary();
108 }
109
106 Status WebViewImpl::Close() { 110 Status WebViewImpl::Close() {
107 Status status = closer_func_.Run(); 111 Status status = closer_func_.Run();
108 if (status.IsOk()) 112 if (status.IsOk())
109 delegate_->OnWebViewClose(this); 113 delegate_->OnWebViewClose(this);
110 return status; 114 return status;
111 } 115 }
112 116
113 Status WebViewImpl::Load(const std::string& url) { 117 Status WebViewImpl::Load(const std::string& url) {
114 base::DictionaryValue params; 118 base::DictionaryValue params;
115 params.SetString("url", url); 119 params.SetString("url", url);
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 387 }
384 if (status.IsError()) 388 if (status.IsError())
385 return status; 389 return status;
386 390
387 if (!cmd_result->GetInteger("nodeId", node_id)) 391 if (!cmd_result->GetInteger("nodeId", node_id))
388 return Status(kUnknownError, "DOM.requestNode missing int 'nodeId'"); 392 return Status(kUnknownError, "DOM.requestNode missing int 'nodeId'");
389 return Status(kOk); 393 return Status(kOk);
390 } 394 }
391 395
392 } // namespace internal 396 } // namespace internal
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/web_view_impl.h ('k') | chrome/test/chromedriver/web_view_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698