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

Side by Side Diff: extensions/browser/api_activity_monitor.h

Issue 1909773002: Convert //extensions/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
« no previous file with comments | « no previous file | extensions/browser/api_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_ACTIVITY_MONITOR_H_ 5 #ifndef EXTENSIONS_BROWSER_API_ACTIVITY_MONITOR_H_
6 #define EXTENSIONS_BROWSER_API_ACTIVITY_MONITOR_H_ 6 #define EXTENSIONS_BROWSER_API_ACTIVITY_MONITOR_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/memory/scoped_ptr.h"
11 11
12 namespace base { 12 namespace base {
13 class ListValue; 13 class ListValue;
14 } 14 }
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 // ApiActivityMonitor is used to monitor extension API event dispatch and API 18 // ApiActivityMonitor is used to monitor extension API event dispatch and API
19 // function calls. An embedder can use this interface to log low-level extension 19 // function calls. An embedder can use this interface to log low-level extension
20 // activity. 20 // activity.
21 class ApiActivityMonitor { 21 class ApiActivityMonitor {
22 public: 22 public:
23 // Called when an API event is dispatched to an extension. 23 // Called when an API event is dispatched to an extension.
24 virtual void OnApiEventDispatched(const std::string& extension_id, 24 virtual void OnApiEventDispatched(
25 const std::string& event_name, 25 const std::string& extension_id,
26 scoped_ptr<base::ListValue> event_args) = 0; 26 const std::string& event_name,
27 std::unique_ptr<base::ListValue> event_args) = 0;
27 28
28 // Called when an extension calls an API function. 29 // Called when an extension calls an API function.
29 virtual void OnApiFunctionCalled(const std::string& extension_id, 30 virtual void OnApiFunctionCalled(const std::string& extension_id,
30 const std::string& api_name, 31 const std::string& api_name,
31 scoped_ptr<base::ListValue> args) = 0; 32 std::unique_ptr<base::ListValue> args) = 0;
32 33
33 protected: 34 protected:
34 virtual ~ApiActivityMonitor() {} 35 virtual ~ApiActivityMonitor() {}
35 }; 36 };
36 37
37 } // namespace extensions 38 } // namespace extensions
38 39
39 #endif // EXTENSIONS_BROWSER_API_ACTIVITY_MONITOR_H_ 40 #endif // EXTENSIONS_BROWSER_API_ACTIVITY_MONITOR_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/api_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698