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

Side by Side Diff: extensions/renderer/event_bindings.h

Issue 1899083003: Convert //extensions/renderer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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_RENDERER_EVENT_BINDINGS_H_ 5 #ifndef EXTENSIONS_RENDERER_EVENT_BINDINGS_H_
6 #define EXTENSIONS_RENDERER_EVENT_BINDINGS_H_ 6 #define EXTENSIONS_RENDERER_EVENT_BINDINGS_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 #include <string> 10 #include <string>
10 11
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "extensions/renderer/object_backed_native_handler.h" 13 #include "extensions/renderer/object_backed_native_handler.h"
14 #include "v8/include/v8.h" 14 #include "v8/include/v8.h"
15 15
16 namespace base { 16 namespace base {
17 class DictionaryValue; 17 class DictionaryValue;
18 } 18 }
19 19
20 namespace extensions { 20 namespace extensions {
21 class EventMatcher; 21 class EventMatcher;
22 22
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Detaches a filtered event. Unlike a normal event, a filtered event is 64 // Detaches a filtered event. Unlike a normal event, a filtered event is
65 // identified by a unique ID per filter, not its name. 65 // identified by a unique ID per filter, not its name.
66 // |matcher_id| The ID of the filtered event. 66 // |matcher_id| The ID of the filtered event.
67 // |is_manual| false if this is part of the extension unload process where all 67 // |is_manual| false if this is part of the extension unload process where all
68 // listeners are automatically detached. 68 // listeners are automatically detached.
69 void DetachFilteredEvent(int matcher_id, bool is_manual); 69 void DetachFilteredEvent(int matcher_id, bool is_manual);
70 70
71 void MatchAgainstEventFilter(const v8::FunctionCallbackInfo<v8::Value>& args); 71 void MatchAgainstEventFilter(const v8::FunctionCallbackInfo<v8::Value>& args);
72 72
73 scoped_ptr<EventMatcher> ParseEventMatcher( 73 std::unique_ptr<EventMatcher> ParseEventMatcher(
74 scoped_ptr<base::DictionaryValue> filter); 74 std::unique_ptr<base::DictionaryValue> filter);
75 75
76 // Called when our context, and therefore us, is invalidated. Run any cleanup. 76 // Called when our context, and therefore us, is invalidated. Run any cleanup.
77 void OnInvalidated(); 77 void OnInvalidated();
78 78
79 // The set of attached events and filtered events. Maintain these so that we 79 // The set of attached events and filtered events. Maintain these so that we
80 // can detch them on unload. 80 // can detch them on unload.
81 std::set<std::string> attached_event_names_; 81 std::set<std::string> attached_event_names_;
82 std::set<int> attached_matcher_ids_; 82 std::set<int> attached_matcher_ids_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(EventBindings); 84 DISALLOW_COPY_AND_ASSIGN(EventBindings);
85 }; 85 };
86 86
87 } // namespace extensions 87 } // namespace extensions
88 88
89 #endif // EXTENSIONS_RENDERER_EVENT_BINDINGS_H_ 89 #endif // EXTENSIONS_RENDERER_EVENT_BINDINGS_H_
OLDNEW
« no previous file with comments | « extensions/renderer/display_source_custom_bindings.cc ('k') | extensions/renderer/event_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698