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

Side by Side Diff: content/public/browser/devtools/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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/public/browser/devtools/devtools_client_host.h"
6
5 #include <algorithm> 7 #include <algorithm>
6 8
7 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
8 #include "base/logging.h" 10 #include "base/logging.h"
9 #include "content/browser/debugger/devtools_client_host.h" 11 #include "content/public/browser/devtools/devtools_manager.h"
10 #include "content/browser/debugger/devtools_manager.h" 12
13 namespace content {
11 14
12 typedef std::vector<DevToolsClientHost*> DevToolsClientHostList; 15 typedef std::vector<DevToolsClientHost*> DevToolsClientHostList;
13 namespace { 16 namespace {
14 base::LazyInstance<DevToolsClientHostList, 17 base::LazyInstance<DevToolsClientHostList,
15 base::LeakyLazyInstanceTraits<DevToolsClientHostList> > 18 base::LeakyLazyInstanceTraits<DevToolsClientHostList> >
16 g_instances = LAZY_INSTANCE_INITIALIZER; 19 g_instances = LAZY_INSTANCE_INITIALIZER;
17 } // namespace 20 } // namespace
18 21
19 // static 22 // static
20 DevToolsClientHost* DevToolsClientHost::FindOwnerClientHost( 23 DevToolsClientHost* DevToolsClientHost::FindOwnerClientHost(
(...skipping 25 matching lines...) Expand all
46 void DevToolsClientHost::ForwardToDevToolsAgent(const IPC::Message& message) { 49 void DevToolsClientHost::ForwardToDevToolsAgent(const IPC::Message& message) {
47 DevToolsManager::GetInstance()->ForwardToDevToolsAgent(this, message); 50 DevToolsManager::GetInstance()->ForwardToDevToolsAgent(this, message);
48 } 51 }
49 52
50 void DevToolsClientHost::NotifyCloseListener() { 53 void DevToolsClientHost::NotifyCloseListener() {
51 if (close_listener_) { 54 if (close_listener_) {
52 close_listener_->ClientHostClosing(this); 55 close_listener_->ClientHostClosing(this);
53 close_listener_ = NULL; 56 close_listener_ = NULL;
54 } 57 }
55 } 58 }
59
60 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698