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

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

Issue 493213004: [DevTools] Implement Inspector.interstitial events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed comments Created 6 years, 4 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) 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_view_devtools_agent_host.h" 5 #include "content/browser/devtools/render_view_devtools_agent_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "content/browser/child_process_security_policy_impl.h" 9 #include "content/browser/child_process_security_policy_impl.h"
10 #include "content/browser/devtools/devtools_manager_impl.h" 10 #include "content/browser/devtools/devtools_manager_impl.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 RenderFrameHost* render_frame_host) { 312 RenderFrameHost* render_frame_host) {
313 return DispatchIPCMessage(message); 313 return DispatchIPCMessage(message);
314 } 314 }
315 315
316 bool RenderViewDevToolsAgentHost::OnMessageReceived( 316 bool RenderViewDevToolsAgentHost::OnMessageReceived(
317 const IPC::Message& message) { 317 const IPC::Message& message) {
318 return DispatchIPCMessage(message); 318 return DispatchIPCMessage(message);
319 } 319 }
320 320
321 void RenderViewDevToolsAgentHost::DidAttachInterstitialPage() { 321 void RenderViewDevToolsAgentHost::DidAttachInterstitialPage() {
322 overrides_handler_->DidAttachInterstitialPage();
323
322 if (!render_view_host_) 324 if (!render_view_host_)
323 return; 325 return;
324 // The rvh set in AboutToNavigateRenderView turned out to be interstitial. 326 // The rvh set in AboutToNavigateRenderView turned out to be interstitial.
325 // Connect back to the real one. 327 // Connect back to the real one.
326 WebContents* web_contents = 328 WebContents* web_contents =
327 WebContents::FromRenderViewHost(render_view_host_); 329 WebContents::FromRenderViewHost(render_view_host_);
328 if (!web_contents) 330 if (!web_contents)
329 return; 331 return;
330 DisconnectRenderViewHost(); 332 DisconnectRenderViewHost();
331 ConnectRenderViewHost(web_contents->GetRenderViewHost()); 333 ConnectRenderViewHost(web_contents->GetRenderViewHost());
332 } 334 }
333 335
336 void RenderViewDevToolsAgentHost::DidDetachInterstitialPage() {
337 overrides_handler_->DidDetachInterstitialPage();
338 }
339
334 void RenderViewDevToolsAgentHost::Observe(int type, 340 void RenderViewDevToolsAgentHost::Observe(int type,
335 const NotificationSource& source, 341 const NotificationSource& source,
336 const NotificationDetails& details) { 342 const NotificationDetails& details) {
337 if (type == content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED) { 343 if (type == content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED) {
338 bool visible = *Details<bool>(details).ptr(); 344 bool visible = *Details<bool>(details).ptr();
339 overrides_handler_->OnVisibilityChanged(visible); 345 overrides_handler_->OnVisibilityChanged(visible);
340 } 346 }
341 } 347 }
342 348
343 void RenderViewDevToolsAgentHost::SetRenderViewHost(RenderViewHost* rvh) { 349 void RenderViewDevToolsAgentHost::SetRenderViewHost(RenderViewHost* rvh) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 scoped_refptr<DevToolsProtocol::Notification> notification = 443 scoped_refptr<DevToolsProtocol::Notification> notification =
438 DevToolsProtocol::ParseNotification(message); 444 DevToolsProtocol::ParseNotification(message);
439 445
440 if (notification) { 446 if (notification) {
441 tracing_handler_->HandleNotification(notification); 447 tracing_handler_->HandleNotification(notification);
442 } 448 }
443 SendMessageToClient(message); 449 SendMessageToClient(message);
444 } 450 }
445 451
446 } // namespace content 452 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/render_view_devtools_agent_host.h ('k') | content/browser/devtools/renderer_overrides_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698