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

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

Issue 8549022: Define DevTools content API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years, 1 month 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
Index: content/browser/debugger/devtools_client_host.cc
diff --git a/content/browser/debugger/devtools_client_host.cc b/content/browser/debugger/devtools_client_host.cc
deleted file mode 100644
index 3ff2c5496e3d2bac3b3369f78fb6a97dc27e41a2..0000000000000000000000000000000000000000
--- a/content/browser/debugger/devtools_client_host.cc
+++ /dev/null
@@ -1,55 +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 <algorithm>
-
-#include "base/lazy_instance.h"
-#include "base/logging.h"
-#include "content/browser/debugger/devtools_client_host.h"
-#include "content/browser/debugger/devtools_manager.h"
-
-typedef std::vector<DevToolsClientHost*> DevToolsClientHostList;
-namespace {
-base::LazyInstance<DevToolsClientHostList,
- base::LeakyLazyInstanceTraits<DevToolsClientHostList> >
- g_instances = LAZY_INSTANCE_INITIALIZER;
-} // namespace
-
-// static
-DevToolsClientHost* DevToolsClientHost::FindOwnerClientHost(
- RenderViewHost* client_rvh) {
- for (DevToolsClientHostList::iterator it = g_instances.Get().begin();
- it != g_instances.Get().end(); ++it) {
- if ((*it)->GetClientRenderViewHost() == client_rvh)
- return *it;
- }
- return NULL;
-}
-
-DevToolsClientHost::~DevToolsClientHost() {
- DevToolsClientHostList::iterator it = std::find(g_instances.Get().begin(),
- g_instances.Get().end(),
- this);
- DCHECK(it != g_instances.Get().end());
- g_instances.Get().erase(it);
-}
-
-RenderViewHost* DevToolsClientHost::GetClientRenderViewHost() {
- return NULL;
-}
-
-DevToolsClientHost::DevToolsClientHost() : close_listener_(NULL) {
- g_instances.Get().push_back(this);
-}
-
-void DevToolsClientHost::ForwardToDevToolsAgent(const IPC::Message& message) {
- DevToolsManager::GetInstance()->ForwardToDevToolsAgent(this, message);
-}
-
-void DevToolsClientHost::NotifyCloseListener() {
- if (close_listener_) {
- close_listener_->ClientHostClosing(this);
- close_listener_ = NULL;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698