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

Unified Diff: content/browser/debugger/render_view_devtools_agent_host.cc

Issue 7774004: Revert 98552 (OpenAndManuallyCloseDevToolsClientHost now fails on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/debugger/render_view_devtools_agent_host.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/debugger/render_view_devtools_agent_host.cc
===================================================================
--- content/browser/debugger/render_view_devtools_agent_host.cc (revision 98553)
+++ content/browser/debugger/render_view_devtools_agent_host.cc (working copy)
@@ -1,58 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/debugger/render_view_devtools_agent_host.h"
-
-#include "base/basictypes.h"
-#include "content/browser/renderer_host/render_process_host.h"
-#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/site_instance.h"
-#include "content/common/notification_service.h"
-
-RenderViewDevToolsAgentHost::Instances RenderViewDevToolsAgentHost::instances_;
-
-DevToolsAgentHost* RenderViewDevToolsAgentHost::FindFor(
- RenderViewHost* rvh) {
- Instances::iterator it = instances_.find(rvh);
- if (it != instances_.end())
- return it->second;
- return new RenderViewDevToolsAgentHost(rvh);
-}
-
-RenderViewDevToolsAgentHost::RenderViewDevToolsAgentHost(RenderViewHost* rvh)
- : render_view_host_(rvh) {
- registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
- Source<RenderViewHost>(rvh));
- instances_[rvh] = this;
-}
-
-void RenderViewDevToolsAgentHost::SendMessageToAgent(IPC::Message* msg) {
- msg->set_routing_id(render_view_host_->routing_id());
- render_view_host_->Send(msg);
-}
-
-void RenderViewDevToolsAgentHost::NotifyClientClosing() {
- NotificationService::current()->Notify(
- content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
- Source<content::BrowserContext>(
- render_view_host_->site_instance()->GetProcess()->browser_context()),
- Details<RenderViewHost>(render_view_host_));
-}
-
-int RenderViewDevToolsAgentHost::GetRenderProcessId() {
- return render_view_host_->process()->id();
-}
-
-void RenderViewDevToolsAgentHost::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- DCHECK(type == content::NOTIFICATION_RENDER_VIEW_HOST_DELETED);
- NotifyCloseListener();
- delete this;
-}
-
-RenderViewDevToolsAgentHost::~RenderViewDevToolsAgentHost() {
- instances_.erase(render_view_host_);
-}
-
« no previous file with comments | « content/browser/debugger/render_view_devtools_agent_host.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698