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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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 CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 // Handles a profile preferance change. 125 // Handles a profile preferance change.
126 void OnProfilePrefChanged(); 126 void OnProfilePrefChanged();
127 127
128 // Broadcasts an event to all listeners. 128 // Broadcasts an event to all listeners.
129 void BroadcastItemStateChanged(api::developer_private::EventType event_type, 129 void BroadcastItemStateChanged(api::developer_private::EventType event_type,
130 const std::string& id); 130 const std::string& id);
131 void BroadcastItemStateChangedHelper( 131 void BroadcastItemStateChangedHelper(
132 api::developer_private::EventType event_type, 132 api::developer_private::EventType event_type,
133 const std::string& extension_id, 133 const std::string& extension_id,
134 scoped_ptr<ExtensionInfoGenerator> info_generator, 134 std::unique_ptr<ExtensionInfoGenerator> info_generator,
135 std::vector<api::developer_private::ExtensionInfo> infos); 135 std::vector<api::developer_private::ExtensionInfo> infos);
136 136
137 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 137 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
138 extension_registry_observer_; 138 extension_registry_observer_;
139 ScopedObserver<ErrorConsole, ErrorConsole::Observer> error_console_observer_; 139 ScopedObserver<ErrorConsole, ErrorConsole::Observer> error_console_observer_;
140 ScopedObserver<ProcessManager, ProcessManagerObserver> 140 ScopedObserver<ProcessManager, ProcessManagerObserver>
141 process_manager_observer_; 141 process_manager_observer_;
142 ScopedObserver<AppWindowRegistry, AppWindowRegistry::Observer> 142 ScopedObserver<AppWindowRegistry, AppWindowRegistry::Observer>
143 app_window_registry_observer_; 143 app_window_registry_observer_;
144 ScopedObserver<ExtensionActionAPI, ExtensionActionAPI::Observer> 144 ScopedObserver<ExtensionActionAPI, ExtensionActionAPI::Observer>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 void RegisterNotifications(); 212 void RegisterNotifications();
213 213
214 Profile* profile_; 214 Profile* profile_;
215 215
216 // Used to start the load |load_extension_dialog_| in the last directory that 216 // Used to start the load |load_extension_dialog_| in the last directory that
217 // was loaded. 217 // was loaded.
218 base::FilePath last_unpacked_directory_; 218 base::FilePath last_unpacked_directory_;
219 219
220 // Created lazily upon OnListenerAdded. 220 // Created lazily upon OnListenerAdded.
221 scoped_ptr<DeveloperPrivateEventRouter> developer_private_event_router_; 221 std::unique_ptr<DeveloperPrivateEventRouter> developer_private_event_router_;
222 222
223 DISALLOW_COPY_AND_ASSIGN(DeveloperPrivateAPI); 223 DISALLOW_COPY_AND_ASSIGN(DeveloperPrivateAPI);
224 }; 224 };
225 225
226 namespace api { 226 namespace api {
227 227
228 class DeveloperPrivateAPIFunction : public ChromeUIThreadExtensionFunction { 228 class DeveloperPrivateAPIFunction : public ChromeUIThreadExtensionFunction {
229 protected: 229 protected:
230 ~DeveloperPrivateAPIFunction() override; 230 ~DeveloperPrivateAPIFunction() override;
231 231
(...skipping 23 matching lines...) Expand all
255 DEVELOPERPRIVATE_GETITEMSINFO) 255 DEVELOPERPRIVATE_GETITEMSINFO)
256 DeveloperPrivateGetItemsInfoFunction(); 256 DeveloperPrivateGetItemsInfoFunction();
257 257
258 private: 258 private:
259 ~DeveloperPrivateGetItemsInfoFunction() override; 259 ~DeveloperPrivateGetItemsInfoFunction() override;
260 ResponseAction Run() override; 260 ResponseAction Run() override;
261 261
262 void OnInfosGenerated( 262 void OnInfosGenerated(
263 std::vector<api::developer_private::ExtensionInfo> infos); 263 std::vector<api::developer_private::ExtensionInfo> infos);
264 264
265 scoped_ptr<ExtensionInfoGenerator> info_generator_; 265 std::unique_ptr<ExtensionInfoGenerator> info_generator_;
266 266
267 DISALLOW_COPY_AND_ASSIGN(DeveloperPrivateGetItemsInfoFunction); 267 DISALLOW_COPY_AND_ASSIGN(DeveloperPrivateGetItemsInfoFunction);
268 }; 268 };
269 269
270 class DeveloperPrivateGetExtensionsInfoFunction 270 class DeveloperPrivateGetExtensionsInfoFunction
271 : public DeveloperPrivateAPIFunction { 271 : public DeveloperPrivateAPIFunction {
272 public: 272 public:
273 DeveloperPrivateGetExtensionsInfoFunction(); 273 DeveloperPrivateGetExtensionsInfoFunction();
274 DECLARE_EXTENSION_FUNCTION("developerPrivate.getExtensionsInfo", 274 DECLARE_EXTENSION_FUNCTION("developerPrivate.getExtensionsInfo",
275 DEVELOPERPRIVATE_GETEXTENSIONSINFO); 275 DEVELOPERPRIVATE_GETEXTENSIONSINFO);
276 276
277 private: 277 private:
278 ~DeveloperPrivateGetExtensionsInfoFunction() override; 278 ~DeveloperPrivateGetExtensionsInfoFunction() override;
279 ResponseAction Run() override; 279 ResponseAction Run() override;
280 280
281 void OnInfosGenerated( 281 void OnInfosGenerated(
282 std::vector<api::developer_private::ExtensionInfo> infos); 282 std::vector<api::developer_private::ExtensionInfo> infos);
283 283
284 scoped_ptr<ExtensionInfoGenerator> info_generator_; 284 std::unique_ptr<ExtensionInfoGenerator> info_generator_;
285 285
286 DISALLOW_COPY_AND_ASSIGN(DeveloperPrivateGetExtensionsInfoFunction); 286 DISALLOW_COPY_AND_ASSIGN(DeveloperPrivateGetExtensionsInfoFunction);
287 }; 287 };
288 288
289 class DeveloperPrivateGetExtensionInfoFunction 289 class DeveloperPrivateGetExtensionInfoFunction
290 : public DeveloperPrivateAPIFunction { 290 : public DeveloperPrivateAPIFunction {
291 public: 291 public:
292 DeveloperPrivateGetExtensionInfoFunction(); 292 DeveloperPrivateGetExtensionInfoFunction();
293 DECLARE_EXTENSION_FUNCTION("developerPrivate.getExtensionInfo", 293 DECLARE_EXTENSION_FUNCTION("developerPrivate.getExtensionInfo",
294 DEVELOPERPRIVATE_GETEXTENSIONINFO); 294 DEVELOPERPRIVATE_GETEXTENSIONINFO);
295 295
296 private: 296 private:
297 ~DeveloperPrivateGetExtensionInfoFunction() override; 297 ~DeveloperPrivateGetExtensionInfoFunction() override;
298 ResponseAction Run() override; 298 ResponseAction Run() override;
299 299
300 void OnInfosGenerated( 300 void OnInfosGenerated(
301 std::vector<api::developer_private::ExtensionInfo> infos); 301 std::vector<api::developer_private::ExtensionInfo> infos);
302 302
303 scoped_ptr<ExtensionInfoGenerator> info_generator_; 303 std::unique_ptr<ExtensionInfoGenerator> info_generator_;
304 304
305 DISALLOW_COPY_AND_ASSIGN(DeveloperPrivateGetExtensionInfoFunction); 305 DISALLOW_COPY_AND_ASSIGN(DeveloperPrivateGetExtensionInfoFunction);
306 }; 306 };
307 307
308 class DeveloperPrivateGetProfileConfigurationFunction 308 class DeveloperPrivateGetProfileConfigurationFunction
309 : public DeveloperPrivateAPIFunction { 309 : public DeveloperPrivateAPIFunction {
310 public: 310 public:
311 DECLARE_EXTENSION_FUNCTION("developerPrivate.getProfileConfiguration", 311 DECLARE_EXTENSION_FUNCTION("developerPrivate.getProfileConfiguration",
312 DEVELOPERPRIVATE_GETPROFILECONFIGURATION); 312 DEVELOPERPRIVATE_GETPROFILECONFIGURATION);
313 313
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 DEVELOPERPRIVATE_REQUESTFILESOURCE); 520 DEVELOPERPRIVATE_REQUESTFILESOURCE);
521 DeveloperPrivateRequestFileSourceFunction(); 521 DeveloperPrivateRequestFileSourceFunction();
522 522
523 protected: 523 protected:
524 ~DeveloperPrivateRequestFileSourceFunction() override; 524 ~DeveloperPrivateRequestFileSourceFunction() override;
525 ResponseAction Run() override; 525 ResponseAction Run() override;
526 526
527 private: 527 private:
528 void Finish(const std::string& file_contents); 528 void Finish(const std::string& file_contents);
529 529
530 scoped_ptr<api::developer_private::RequestFileSource::Params> params_; 530 std::unique_ptr<api::developer_private::RequestFileSource::Params> params_;
531 }; 531 };
532 532
533 class DeveloperPrivateOpenDevToolsFunction 533 class DeveloperPrivateOpenDevToolsFunction
534 : public DeveloperPrivateAPIFunction { 534 : public DeveloperPrivateAPIFunction {
535 public: 535 public:
536 DECLARE_EXTENSION_FUNCTION("developerPrivate.openDevTools", 536 DECLARE_EXTENSION_FUNCTION("developerPrivate.openDevTools",
537 DEVELOPERPRIVATE_OPENDEVTOOLS); 537 DEVELOPERPRIVATE_OPENDEVTOOLS);
538 DeveloperPrivateOpenDevToolsFunction(); 538 DeveloperPrivateOpenDevToolsFunction();
539 539
540 protected: 540 protected:
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 protected: 608 protected:
609 ~DeveloperPrivateUpdateExtensionCommandFunction() override; 609 ~DeveloperPrivateUpdateExtensionCommandFunction() override;
610 ResponseAction Run() override; 610 ResponseAction Run() override;
611 }; 611 };
612 612
613 } // namespace api 613 } // namespace api
614 614
615 } // namespace extensions 615 } // namespace extensions
616 616
617 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_ 617 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698