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

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

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
12 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
13 #include "content/public/browser/devtools_manager_delegate.h" 14 #include "content/public/browser/devtools_manager_delegate.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 class DevToolsAgentHostImpl; 18 class DevToolsAgentHostImpl;
18 19
19 // This class is a singleton that manage global DevTools state for the whole 20 // This class is a singleton that manage global DevTools state for the whole
20 // browser. 21 // browser.
21 // TODO(dgozman): remove this class entirely. 22 // TODO(dgozman): remove this class entirely.
22 class CONTENT_EXPORT DevToolsManager { 23 class CONTENT_EXPORT DevToolsManager {
23 public: 24 public:
24 // Returns single instance of this class. The instance is destroyed on the 25 // Returns single instance of this class. The instance is destroyed on the
25 // browser main loop exit so this method MUST NOT be called after that point. 26 // browser main loop exit so this method MUST NOT be called after that point.
26 static DevToolsManager* GetInstance(); 27 static DevToolsManager* GetInstance();
27 28
28 DevToolsManager(); 29 DevToolsManager();
29 virtual ~DevToolsManager(); 30 virtual ~DevToolsManager();
30 31
31 DevToolsManagerDelegate* delegate() const { return delegate_.get(); } 32 DevToolsManagerDelegate* delegate() const { return delegate_.get(); }
32 33
33 void AgentHostStateChanged(DevToolsAgentHostImpl* agent_host, bool attached); 34 void AgentHostStateChanged(DevToolsAgentHostImpl* agent_host, bool attached);
34 35
35 private: 36 private:
36 friend struct base::DefaultSingletonTraits<DevToolsManager>; 37 friend struct base::DefaultSingletonTraits<DevToolsManager>;
37 38
38 scoped_ptr<DevToolsManagerDelegate> delegate_; 39 std::unique_ptr<DevToolsManagerDelegate> delegate_;
39 int attached_hosts_count_; 40 int attached_hosts_count_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(DevToolsManager); 42 DISALLOW_COPY_AND_ASSIGN(DevToolsManager);
42 }; 43 };
43 44
44 } // namespace content 45 } // namespace content
45 46
46 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_ 47 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_frame_trace_recorder.cc ('k') | content/browser/devtools/devtools_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698