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

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

Issue 559933003: [DevTools] Rename DevToolsManagerImpl to DevToolsManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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/devtools_manager_impl.h" 5 #include "content/browser/devtools/devtools_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/browser/devtools/devtools_netlog_observer.h" 9 #include "content/browser/devtools/devtools_netlog_observer.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 #include "content/public/browser/content_browser_client.h" 11 #include "content/public/browser/content_browser_client.h"
12 #include "content/public/browser/devtools_agent_host.h"
13 #include "content/public/browser/devtools_manager_delegate.h" 12 #include "content/public/browser/devtools_manager_delegate.h"
14 13
15 namespace content { 14 namespace content {
16 15
17 // static 16 // static
18 DevToolsManagerImpl* DevToolsManagerImpl::GetInstance() { 17 DevToolsManager* DevToolsManager::GetInstance() {
19 return Singleton<DevToolsManagerImpl>::get(); 18 return Singleton<DevToolsManager>::get();
20 } 19 }
21 20
22 DevToolsManagerImpl::DevToolsManagerImpl() 21 DevToolsManager::DevToolsManager()
23 : delegate_(GetContentClient()->browser()->GetDevToolsManagerDelegate()), 22 : delegate_(GetContentClient()->browser()->GetDevToolsManagerDelegate()),
24 client_count_(0) { 23 client_count_(0) {
25 } 24 }
26 25
27 DevToolsManagerImpl::~DevToolsManagerImpl() { 26 DevToolsManager::~DevToolsManager() {
28 DCHECK(!client_count_); 27 DCHECK(!client_count_);
29 } 28 }
30 29
31 void DevToolsManagerImpl::OnClientAttached() { 30 void DevToolsManager::OnClientAttached() {
32 if (!client_count_) { 31 if (!client_count_) {
33 BrowserThread::PostTask( 32 BrowserThread::PostTask(
34 BrowserThread::IO, 33 BrowserThread::IO,
35 FROM_HERE, 34 FROM_HERE,
36 base::Bind(&DevToolsNetLogObserver::Attach)); 35 base::Bind(&DevToolsNetLogObserver::Attach));
37 } 36 }
38 client_count_++; 37 client_count_++;
39 } 38 }
40 39
41 void DevToolsManagerImpl::OnClientDetached() { 40 void DevToolsManager::OnClientDetached() {
42 client_count_--; 41 client_count_--;
43 if (!client_count_) { 42 if (!client_count_) {
44 BrowserThread::PostTask( 43 BrowserThread::PostTask(
45 BrowserThread::IO, 44 BrowserThread::IO,
46 FROM_HERE, 45 FROM_HERE,
47 base::Bind(&DevToolsNetLogObserver::Detach)); 46 base::Bind(&DevToolsNetLogObserver::Detach));
48 } 47 }
49 } 48 }
50 49
51 } // namespace content 50 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_manager.h ('k') | content/browser/devtools/devtools_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698