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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 442303002: DevTools: migrate DevTools APIs to use WebContents instead of RenderViewHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 return true; 525 return true;
526 } else { 526 } else {
527 while ((observer = it.GetNext()) != NULL) 527 while ((observer = it.GetNext()) != NULL)
528 if (observer->OnMessageReceived(message)) 528 if (observer->OnMessageReceived(message))
529 return true; 529 return true;
530 } 530 }
531 531
532 // Message handlers should be aware of which 532 // Message handlers should be aware of which
533 // RenderViewHost/RenderFrameHost sent the message, which is temporarily 533 // RenderViewHost/RenderFrameHost sent the message, which is temporarily
534 // stored in render_(view|frame)_message_source_. 534 // stored in render_(view|frame)_message_source_.
535 if (render_frame_host) { 535 if (render_frame_host)
536 if (RenderViewDevToolsAgentHost::DispatchIPCMessage(
537 render_frame_host->GetRenderViewHost(), message))
538 return true;
539 render_frame_message_source_ = render_frame_host; 536 render_frame_message_source_ = render_frame_host;
540 } else { 537 else
541 if (RenderViewDevToolsAgentHost::DispatchIPCMessage(
542 render_view_host, message))
543 return true;
544 render_view_message_source_ = render_view_host; 538 render_view_message_source_ = render_view_host;
545 }
546 539
547 bool handled = true; 540 bool handled = true;
548 IPC_BEGIN_MESSAGE_MAP(WebContentsImpl, message) 541 IPC_BEGIN_MESSAGE_MAP(WebContentsImpl, message)
549 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung) 542 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung)
550 IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed) 543 IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed)
551 IPC_MESSAGE_HANDLER(FrameHostMsg_DomOperationResponse, 544 IPC_MESSAGE_HANDLER(FrameHostMsg_DomOperationResponse,
552 OnDomOperationResponse) 545 OnDomOperationResponse)
553 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeThemeColor, 546 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeThemeColor,
554 OnThemeColorChanged) 547 OnThemeColorChanged)
555 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishDocumentLoad, 548 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishDocumentLoad,
(...skipping 3668 matching lines...) Expand 10 before | Expand all | Expand 10 after
4224 if (new_size != old_size) 4217 if (new_size != old_size)
4225 delegate_->UpdatePreferredSize(this, new_size); 4218 delegate_->UpdatePreferredSize(this, new_size);
4226 } 4219 }
4227 4220
4228 void WebContentsImpl::ResumeResponseDeferredAtStart() { 4221 void WebContentsImpl::ResumeResponseDeferredAtStart() {
4229 FrameTreeNode* node = frame_tree_.root(); 4222 FrameTreeNode* node = frame_tree_.root();
4230 node->render_manager()->ResumeResponseDeferredAtStart(); 4223 node->render_manager()->ResumeResponseDeferredAtStart();
4231 } 4224 }
4232 4225
4233 } // namespace content 4226 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698