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

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

Issue 2300703005: DevTools: merge devtools_http_handler into content - it is used in all the embedders anyways. (Closed)
Patch Set: for review Created 4 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 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/public/browser/devtools_manager_delegate.h" 14 #include "content/public/browser/devtools_manager_delegate.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 class DevToolsAgentHostImpl; 18 class DevToolsAgentHostImpl;
19 class DevToolsHttpHandler;
19 20
20 // This class is a singleton that manage global DevTools state for the whole 21 // This class is a singleton that manage global DevTools state for the whole
21 // browser. 22 // browser.
22 // TODO(dgozman): remove this class entirely. 23 // TODO(dgozman): remove this class entirely.
23 class CONTENT_EXPORT DevToolsManager { 24 class CONTENT_EXPORT DevToolsManager {
24 public: 25 public:
25 // Returns single instance of this class. The instance is destroyed on the 26 // Returns single instance of this class. The instance is destroyed on the
26 // browser main loop exit so this method MUST NOT be called after that point. 27 // browser main loop exit so this method MUST NOT be called after that point.
27 static DevToolsManager* GetInstance(); 28 static DevToolsManager* GetInstance();
28 29
29 DevToolsManager(); 30 DevToolsManager();
30 virtual ~DevToolsManager(); 31 virtual ~DevToolsManager();
31 32
32 DevToolsManagerDelegate* delegate() const { return delegate_.get(); } 33 DevToolsManagerDelegate* delegate() const { return delegate_.get(); }
33 34
34 void AgentHostStateChanged(DevToolsAgentHostImpl* agent_host, bool attached); 35 void AgentHostStateChanged(DevToolsAgentHostImpl* agent_host, bool attached);
35 36
37 void SetHttpHandler(std::unique_ptr<DevToolsHttpHandler> http_handler);
38
36 private: 39 private:
37 friend struct base::DefaultSingletonTraits<DevToolsManager>; 40 friend struct base::DefaultSingletonTraits<DevToolsManager>;
38 41
39 std::unique_ptr<DevToolsManagerDelegate> delegate_; 42 std::unique_ptr<DevToolsManagerDelegate> delegate_;
43 std::unique_ptr<DevToolsHttpHandler> http_handler_;
40 int attached_hosts_count_; 44 int attached_hosts_count_;
41 45
42 DISALLOW_COPY_AND_ASSIGN(DevToolsManager); 46 DISALLOW_COPY_AND_ASSIGN(DevToolsManager);
43 }; 47 };
44 48
45 } // namespace content 49 } // namespace content
46 50
47 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_ 51 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698