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

Side by Side Diff: extensions/browser/api/webcam_private/webcam_private_api.h

Issue 1902873002: Convert //extensions/browser/api 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_WEBCAM_PRIVATE_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_WEBCAM_PRIVATE_API_H_
6 #define EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_WEBCAM_PRIVATE_API_H_ 6 #define EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_WEBCAM_PRIVATE_API_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/scoped_observer.h" 12 #include "base/scoped_observer.h"
13 #include "extensions/browser/api/api_resource_manager.h" 13 #include "extensions/browser/api/api_resource_manager.h"
14 #include "extensions/browser/api/webcam_private/webcam.h" 14 #include "extensions/browser/api/webcam_private/webcam.h"
15 #include "extensions/browser/browser_context_keyed_api_factory.h" 15 #include "extensions/browser/browser_context_keyed_api_factory.h"
16 #include "extensions/browser/extension_function.h" 16 #include "extensions/browser/extension_function.h"
17 #include "extensions/browser/process_manager_observer.h" 17 #include "extensions/browser/process_manager_observer.h"
18 18
19 class Profile; 19 class Profile;
20 20
21 namespace extensions { 21 namespace extensions {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 const std::string& webcam_id); 66 const std::string& webcam_id);
67 67
68 // BrowserContextKeyedAPI: 68 // BrowserContextKeyedAPI:
69 static const char* service_name() { 69 static const char* service_name() {
70 return "WebcamPrivateAPI"; 70 return "WebcamPrivateAPI";
71 } 71 }
72 static const bool kServiceIsNULLWhileTesting = true; 72 static const bool kServiceIsNULLWhileTesting = true;
73 static const bool kServiceRedirectedInIncognito = true; 73 static const bool kServiceRedirectedInIncognito = true;
74 74
75 content::BrowserContext* const browser_context_; 75 content::BrowserContext* const browser_context_;
76 scoped_ptr<ApiResourceManager<WebcamResource>> webcam_resource_manager_; 76 std::unique_ptr<ApiResourceManager<WebcamResource>> webcam_resource_manager_;
77 77
78 base::WeakPtrFactory<WebcamPrivateAPI> weak_ptr_factory_; 78 base::WeakPtrFactory<WebcamPrivateAPI> weak_ptr_factory_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(WebcamPrivateAPI); 80 DISALLOW_COPY_AND_ASSIGN(WebcamPrivateAPI);
81 }; 81 };
82 82
83 template <> 83 template <>
84 void BrowserContextKeyedAPIFactory<WebcamPrivateAPI> 84 void BrowserContextKeyedAPIFactory<WebcamPrivateAPI>
85 ::DeclareFactoryDependencies(); 85 ::DeclareFactoryDependencies();
86 86
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 private: 169 private:
170 void OnResetWebcam(bool success); 170 void OnResetWebcam(bool success);
171 171
172 DISALLOW_COPY_AND_ASSIGN(WebcamPrivateResetFunction); 172 DISALLOW_COPY_AND_ASSIGN(WebcamPrivateResetFunction);
173 }; 173 };
174 174
175 } // namespace extensions 175 } // namespace extensions
176 176
177 #endif // EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_WEBCAM_PRIVATE_API_H_ 177 #endif // EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_WEBCAM_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698