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

Side by Side Diff: extensions/renderer/dispatcher.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
« no previous file with comments | « extensions/renderer/app_window_custom_bindings.cc ('k') | extensions/renderer/dispatcher.cc » ('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_RENDERER_DISPATCHER_H_ 5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_H_
6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory>
11 #include <set> 12 #include <set>
12 #include <string> 13 #include <string>
13 #include <utility> 14 #include <utility>
14 #include <vector> 15 #include <vector>
15 16
16 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
17 #include "base/macros.h" 18 #include "base/macros.h"
18 #include "base/memory/scoped_ptr.h"
19 #include "base/scoped_observer.h" 19 #include "base/scoped_observer.h"
20 #include "base/timer/timer.h" 20 #include "base/timer/timer.h"
21 #include "content/public/renderer/render_thread_observer.h" 21 #include "content/public/renderer/render_thread_observer.h"
22 #include "extensions/common/event_filter.h" 22 #include "extensions/common/event_filter.h"
23 #include "extensions/common/extension.h" 23 #include "extensions/common/extension.h"
24 #include "extensions/common/extensions_client.h" 24 #include "extensions/common/extensions_client.h"
25 #include "extensions/common/features/feature.h" 25 #include "extensions/common/features/feature.h"
26 #include "extensions/renderer/resource_bundle_source_map.h" 26 #include "extensions/renderer/resource_bundle_source_map.h"
27 #include "extensions/renderer/script_context.h" 27 #include "extensions/renderer/script_context.h"
28 #include "extensions/renderer/script_context_set.h" 28 #include "extensions/renderer/script_context_set.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 // True if the IdleNotification timer should be set. 261 // True if the IdleNotification timer should be set.
262 bool set_idle_notifications_; 262 bool set_idle_notifications_;
263 263
264 // The IDs of extensions that failed to load, mapped to the error message 264 // The IDs of extensions that failed to load, mapped to the error message
265 // generated on failure. 265 // generated on failure.
266 std::map<std::string, std::string> extension_load_errors_; 266 std::map<std::string, std::string> extension_load_errors_;
267 267
268 // All the bindings contexts that are currently loaded for this renderer. 268 // All the bindings contexts that are currently loaded for this renderer.
269 // There is zero or one for each v8 context. 269 // There is zero or one for each v8 context.
270 scoped_ptr<ScriptContextSet> script_context_set_; 270 std::unique_ptr<ScriptContextSet> script_context_set_;
271 271
272 scoped_ptr<ContentWatcher> content_watcher_; 272 std::unique_ptr<ContentWatcher> content_watcher_;
273 273
274 scoped_ptr<UserScriptSetManager> user_script_set_manager_; 274 std::unique_ptr<UserScriptSetManager> user_script_set_manager_;
275 275
276 scoped_ptr<ScriptInjectionManager> script_injection_manager_; 276 std::unique_ptr<ScriptInjectionManager> script_injection_manager_;
277 277
278 // Same as above, but on a longer timer and will run even if the process is 278 // Same as above, but on a longer timer and will run even if the process is
279 // not idle, to ensure that IdleHandle gets called eventually. 279 // not idle, to ensure that IdleHandle gets called eventually.
280 scoped_ptr<base::RepeatingTimer> forced_idle_timer_; 280 std::unique_ptr<base::RepeatingTimer> forced_idle_timer_;
281 281
282 // The extensions and apps that are active in this process. 282 // The extensions and apps that are active in this process.
283 ExtensionIdSet active_extension_ids_; 283 ExtensionIdSet active_extension_ids_;
284 284
285 ResourceBundleSourceMap source_map_; 285 ResourceBundleSourceMap source_map_;
286 286
287 // Cache for the v8 representation of extension API schemas. 287 // Cache for the v8 representation of extension API schemas.
288 scoped_ptr<V8SchemaRegistry> v8_schema_registry_; 288 std::unique_ptr<V8SchemaRegistry> v8_schema_registry_;
289 289
290 // Sends API requests to the extension host. 290 // Sends API requests to the extension host.
291 scoped_ptr<RequestSender> request_sender_; 291 std::unique_ptr<RequestSender> request_sender_;
292 292
293 // The platforms system font family and size; 293 // The platforms system font family and size;
294 std::string system_font_family_; 294 std::string system_font_family_;
295 std::string system_font_size_; 295 std::string system_font_size_;
296 296
297 // Mapping of port IDs to tabs. If there is no tab, the value would be -1. 297 // Mapping of port IDs to tabs. If there is no tab, the value would be -1.
298 std::map<int, int> port_to_tab_id_map_; 298 std::map<int, int> port_to_tab_id_map_;
299 299
300 // It is important for this to come after the ScriptInjectionManager, so that 300 // It is important for this to come after the ScriptInjectionManager, so that
301 // the observer is destroyed before the UserScriptSet. 301 // the observer is destroyed before the UserScriptSet.
302 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> 302 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer>
303 user_script_set_manager_observer_; 303 user_script_set_manager_observer_;
304 304
305 // Status of webrequest usage. 305 // Status of webrequest usage.
306 bool webrequest_used_; 306 bool webrequest_used_;
307 307
308 // The WebView partition ID associated with this process's storage partition, 308 // The WebView partition ID associated with this process's storage partition,
309 // if this renderer is a WebView guest render process. Otherwise, this will be 309 // if this renderer is a WebView guest render process. Otherwise, this will be
310 // empty. 310 // empty.
311 std::string webview_partition_id_; 311 std::string webview_partition_id_;
312 312
313 DISALLOW_COPY_AND_ASSIGN(Dispatcher); 313 DISALLOW_COPY_AND_ASSIGN(Dispatcher);
314 }; 314 };
315 315
316 } // namespace extensions 316 } // namespace extensions
317 317
318 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ 318 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_
OLDNEW
« no previous file with comments | « extensions/renderer/app_window_custom_bindings.cc ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698