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

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

Issue 988003002: DevTools: pick sw targets to attach to on the backend side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: track url, not frame Created 5 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
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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 385
386 void RenderFrameDevToolsAgentHost::DidDetachInterstitialPage() { 386 void RenderFrameDevToolsAgentHost::DidDetachInterstitialPage() {
387 page_handler_->DidDetachInterstitialPage(); 387 page_handler_->DidDetachInterstitialPage();
388 } 388 }
389 389
390 void RenderFrameDevToolsAgentHost::TitleWasSet( 390 void RenderFrameDevToolsAgentHost::TitleWasSet(
391 NavigationEntry* entry, bool explicit_set) { 391 NavigationEntry* entry, bool explicit_set) {
392 DevToolsManager::GetInstance()->AgentHostChanged(this); 392 DevToolsManager::GetInstance()->AgentHostChanged(this);
393 } 393 }
394 394
395 void RenderFrameDevToolsAgentHost::NavigationEntryCommitted( 395 void RenderFrameDevToolsAgentHost::NavigationEntryCommitted(
dgozman 2015/03/08 07:49:56 This method is supposed to do the same url invalid
pfeldman 2015/03/08 08:30:57 I now think that I need the one below to fire even
396 const LoadCommittedDetails& load_details) { 396 const LoadCommittedDetails& load_details) {
397 DevToolsManager::GetInstance()->AgentHostChanged(this); 397 DevToolsManager::GetInstance()->AgentHostChanged(this);
398 } 398 }
399 399
400 void RenderFrameDevToolsAgentHost::DidCommitProvisionalLoadForFrame(
401 RenderFrameHost* render_frame_host,
402 const GURL& url,
403 ui::PageTransition transition_type) {
404 if (!render_frame_host->GetParent())
405 service_worker_handler_->SetURL(url);
406 }
407
400 void RenderFrameDevToolsAgentHost::Observe(int type, 408 void RenderFrameDevToolsAgentHost::Observe(int type,
401 const NotificationSource& source, 409 const NotificationSource& source,
402 const NotificationDetails& details) { 410 const NotificationDetails& details) {
403 if (type == content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED) { 411 if (type == content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED) {
404 bool visible = *Details<bool>(details).ptr(); 412 bool visible = *Details<bool>(details).ptr();
405 page_handler_->OnVisibilityChanged(visible); 413 page_handler_->OnVisibilityChanged(visible);
406 } 414 }
407 } 415 }
408 416
409 void RenderFrameDevToolsAgentHost::SetRenderFrameHost(RenderFrameHost* rfh) { 417 void RenderFrameDevToolsAgentHost::SetRenderFrameHost(RenderFrameHost* rfh) {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 } 536 }
529 537
530 void RenderFrameDevToolsAgentHost::DispatchOnInspectorFrontend( 538 void RenderFrameDevToolsAgentHost::DispatchOnInspectorFrontend(
531 const std::string& message) { 539 const std::string& message) {
532 if (!IsAttached() || !render_frame_host_) 540 if (!IsAttached() || !render_frame_host_)
533 return; 541 return;
534 SendMessageToClient(message); 542 SendMessageToClient(message);
535 } 543 }
536 544
537 } // namespace content 545 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698