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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/singleton.h"
10 #include "content/common/content_export.h"
11 #include "content/public/browser/devtools_manager_delegate.h"
15 class DevToolsAgentHostImpl
;
17 // This class is a singleton that manage global DevTools state for the whole
19 // TODO(dgozman): remove this class entirely.
20 class CONTENT_EXPORT DevToolsManager
{
22 // Returns single instance of this class. The instance is destroyed on the
23 // browser main loop exit so this method MUST NOT be called after that point.
24 static DevToolsManager
* GetInstance();
27 virtual ~DevToolsManager();
29 DevToolsManagerDelegate
* delegate() const { return delegate_
.get(); }
31 void AgentHostStateChanged(DevToolsAgentHostImpl
* agent_host
, bool attached
);
34 friend struct DefaultSingletonTraits
<DevToolsManager
>;
36 scoped_ptr
<DevToolsManagerDelegate
> delegate_
;
37 int attached_hosts_count_
;
39 DISALLOW_COPY_AND_ASSIGN(DevToolsManager
);
42 } // namespace content
44 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_