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

Side by Side Diff: content/browser/devtools/render_frame_devtools_agent_host.cc

Issue 2572933002: [DevTools] Migrate storage domain to new generator. (Closed)
Patch Set: fixed 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 unified diff | Download patch
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/devtools/render_frame_devtools_agent_host.h" 5 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
6 6
7 #include <tuple> 7 #include <tuple>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/guid.h" 10 #include "base/guid.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 DevToolsAgentHost::GetOrCreateFor(web_contents); 390 DevToolsAgentHost::GetOrCreateFor(web_contents);
391 } 391 }
392 } 392 }
393 393
394 RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost( 394 RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost(
395 RenderFrameHostImpl* host) 395 RenderFrameHostImpl* host)
396 : DevToolsAgentHostImpl(base::GenerateGUID()), 396 : DevToolsAgentHostImpl(base::GenerateGUID()),
397 input_handler_(new devtools::input::InputHandler()), 397 input_handler_(new devtools::input::InputHandler()),
398 service_worker_handler_( 398 service_worker_handler_(
399 new devtools::service_worker::ServiceWorkerHandler()), 399 new devtools::service_worker::ServiceWorkerHandler()),
400 storage_handler_(new devtools::storage::StorageHandler()),
401 target_handler_(new devtools::target::TargetHandler()), 400 target_handler_(new devtools::target::TargetHandler()),
402 frame_trace_recorder_(nullptr), 401 frame_trace_recorder_(nullptr),
403 protocol_handler_(new DevToolsProtocolHandler(this)), 402 protocol_handler_(new DevToolsProtocolHandler(this)),
404 handlers_frame_host_(nullptr), 403 handlers_frame_host_(nullptr),
405 current_frame_crashed_(false), 404 current_frame_crashed_(false),
406 pending_handle_(nullptr), 405 pending_handle_(nullptr),
407 frame_tree_node_(host->frame_tree_node()) { 406 frame_tree_node_(host->frame_tree_node()) {
408 DevToolsProtocolDispatcher* dispatcher = protocol_handler_->dispatcher(); 407 DevToolsProtocolDispatcher* dispatcher = protocol_handler_->dispatcher();
409 dispatcher->SetInputHandler(input_handler_.get()); 408 dispatcher->SetInputHandler(input_handler_.get());
410 dispatcher->SetServiceWorkerHandler(service_worker_handler_.get()); 409 dispatcher->SetServiceWorkerHandler(service_worker_handler_.get());
411 dispatcher->SetStorageHandler(storage_handler_.get());
412 dispatcher->SetTargetHandler(target_handler_.get()); 410 dispatcher->SetTargetHandler(target_handler_.get());
413 411
414 SetPending(host); 412 SetPending(host);
415 CommitPending(); 413 CommitPending();
416 WebContentsObserver::Observe(WebContents::FromRenderFrameHost(host)); 414 WebContentsObserver::Observe(WebContents::FromRenderFrameHost(host));
417 415
418 if (web_contents() && web_contents()->GetCrashedStatus() != 416 if (web_contents() && web_contents()->GetCrashedStatus() !=
419 base::TERMINATION_STATUS_STILL_RUNNING) { 417 base::TERMINATION_STATUS_STILL_RUNNING) {
420 current_frame_crashed_ = true; 418 current_frame_crashed_ = true;
421 } 419 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 502
505 schema_handler_.reset(new protocol::SchemaHandler()); 503 schema_handler_.reset(new protocol::SchemaHandler());
506 schema_handler_->Wire(session()->dispatcher()); 504 schema_handler_->Wire(session()->dispatcher());
507 505
508 if (!frame_tree_node_->parent()) { 506 if (!frame_tree_node_->parent()) {
509 security_handler_.reset(new protocol::SecurityHandler()); 507 security_handler_.reset(new protocol::SecurityHandler());
510 security_handler_->Wire(session()->dispatcher()); 508 security_handler_->Wire(session()->dispatcher());
511 security_handler_->SetRenderFrameHost(handlers_frame_host_); 509 security_handler_->SetRenderFrameHost(handlers_frame_host_);
512 } 510 }
513 511
512 storage_handler_.reset(new protocol::StorageHandler());
513 storage_handler_->Wire(session()->dispatcher());
514 storage_handler_->SetRenderFrameHost(handlers_frame_host_);
515
514 tracing_handler_.reset(new protocol::TracingHandler( 516 tracing_handler_.reset(new protocol::TracingHandler(
515 protocol::TracingHandler::Renderer, 517 protocol::TracingHandler::Renderer,
516 frame_tree_node_->frame_tree_node_id(), 518 frame_tree_node_->frame_tree_node_id(),
517 GetIOContext())); 519 GetIOContext()));
518 tracing_handler_->Wire(session()->dispatcher()); 520 tracing_handler_->Wire(session()->dispatcher());
519 521
520 if (current_) 522 if (current_)
521 current_->Attach(); 523 current_->Attach();
522 if (pending_) 524 if (pending_)
523 pending_->Attach(); 525 pending_->Attach();
(...skipping 16 matching lines...) Expand all
540 if (page_handler_) { 542 if (page_handler_) {
541 page_handler_->Disable(); 543 page_handler_->Disable();
542 page_handler_.reset(); 544 page_handler_.reset();
543 } 545 }
544 schema_handler_->Disable(); 546 schema_handler_->Disable();
545 schema_handler_.reset(); 547 schema_handler_.reset();
546 if (security_handler_) { 548 if (security_handler_) {
547 security_handler_->Disable(); 549 security_handler_->Disable();
548 security_handler_.reset(); 550 security_handler_.reset();
549 } 551 }
552 storage_handler_->Disable();
553 storage_handler_.reset();
550 tracing_handler_->Disable(); 554 tracing_handler_->Disable();
551 tracing_handler_.reset(); 555 tracing_handler_.reset();
552 556
553 if (current_) 557 if (current_)
554 current_->Detach(); 558 current_->Detach();
555 if (pending_) 559 if (pending_)
556 pending_->Detach(); 560 pending_->Detach();
557 OnClientDetached(); 561 OnClientDetached();
558 } 562 }
559 563
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 RenderFrameHost* host) { 1183 RenderFrameHost* host) {
1180 return (current_ && current_->host() == host) || 1184 return (current_ && current_->host() == host) ||
1181 (pending_ && pending_->host() == host); 1185 (pending_ && pending_->host() == host);
1182 } 1186 }
1183 1187
1184 bool RenderFrameDevToolsAgentHost::IsChildFrame() { 1188 bool RenderFrameDevToolsAgentHost::IsChildFrame() {
1185 return current_ && current_->host()->GetParent(); 1189 return current_ && current_->host()->GetParent();
1186 } 1190 }
1187 1191
1188 } // namespace content 1192 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698