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

Unified Diff: content/browser/devtools/protocol/dom_handler.cc

Issue 2548263002: [DevTools] Migrate dom, emulation, inspector, network, page and schema handlers to new generator. (Closed)
Patch Set: rebased atop of roll Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/devtools/protocol/dom_handler.cc
diff --git a/content/browser/devtools/protocol/dom_handler.cc b/content/browser/devtools/protocol/dom_handler.cc
index 83962556677db601bb8df4103018b3bfbf12e53e..036ca491d1b0df1cbb4dcff478c3487f3da98b40 100644
--- a/content/browser/devtools/protocol/dom_handler.cc
+++ b/content/browser/devtools/protocol/dom_handler.cc
@@ -10,10 +10,7 @@
#include "content/browser/frame_host/render_frame_host_impl.h"
namespace content {
-namespace devtools {
-namespace dom {
-
-typedef DevToolsProtocolClient::Response Response;
+namespace protocol {
DOMHandler::DOMHandler() : host_(nullptr) {
}
@@ -21,28 +18,36 @@ DOMHandler::DOMHandler() : host_(nullptr) {
DOMHandler::~DOMHandler() {
}
+void DOMHandler::Wire(UberDispatcher* dispatcher) {
+ DOM::Dispatcher::wire(dispatcher, this);
+}
+
void DOMHandler::SetRenderFrameHost(RenderFrameHostImpl* host) {
host_ = host;
}
-Response DOMHandler::SetFileInputFiles(NodeId node_id,
- const std::vector<std::string>& files) {
+Response DOMHandler::Disable() {
+ return Response::OK();
+}
+
+Response DOMHandler::SetFileInputFiles(
+ DOM::NodeId node_id,
+ std::unique_ptr<protocol::Array<std::string>> files) {
if (host_) {
- for (const auto& file : files) {
+ for (size_t i = 0; i < files->length(); i++) {
#if defined(OS_WIN)
ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile(
host_->GetProcess()->GetID(),
- base::FilePath(base::UTF8ToUTF16(file)));
+ base::FilePath(base::UTF8ToUTF16(files->get(i))));
#else
ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile(
host_->GetProcess()->GetID(),
- base::FilePath(file));
+ base::FilePath(files->get(i)));
#endif // OS_WIN
}
}
return Response::FallThrough();
}
-} // namespace dom
-} // namespace devtools
+} // namespace protocol
} // namespace content
« no previous file with comments | « content/browser/devtools/protocol/dom_handler.h ('k') | content/browser/devtools/protocol/emulation_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698