| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_IMPL_H_ | |
| 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_IMPL_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <string> | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/compiler_specific.h" | |
| 13 #include "base/memory/singleton.h" | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 class DevToolsManagerDelegate; | |
| 18 | |
| 19 // This class is a singleton that manage global DevTools state for the whole | |
| 20 // browser. | |
| 21 class DevToolsManagerImpl { | |
| 22 public: | |
| 23 // Returns single instance of this class. The instance is destroyed on the | |
| 24 // browser main loop exit so this method MUST NOT be called after that point. | |
| 25 static DevToolsManagerImpl* GetInstance(); | |
| 26 | |
| 27 DevToolsManagerImpl(); | |
| 28 virtual ~DevToolsManagerImpl(); | |
| 29 | |
| 30 DevToolsManagerDelegate* delegate() const { return delegate_.get(); } | |
| 31 void OnClientAttached(); | |
| 32 void OnClientDetached(); | |
| 33 | |
| 34 private: | |
| 35 friend struct DefaultSingletonTraits<DevToolsManagerImpl>; | |
| 36 | |
| 37 scoped_ptr<DevToolsManagerDelegate> delegate_; | |
| 38 int client_count_; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerImpl); | |
| 41 }; | |
| 42 | |
| 43 } // namespace content | |
| 44 | |
| 45 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_IMPL_H_ | |
| OLD | NEW |