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

Side by Side Diff: extensions/renderer/user_script_injector.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_USER_SCRIPT_INJECTOR_H_ 5 #ifndef EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
6 #define EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ 6 #define EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
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/common/user_script.h" 13 #include "extensions/common/user_script.h"
14 #include "extensions/renderer/script_injection.h" 14 #include "extensions/renderer/script_injection.h"
15 #include "extensions/renderer/user_script_set.h" 15 #include "extensions/renderer/user_script_set.h"
16 16
17 class InjectionHost; 17 class InjectionHost;
18 18
19 namespace blink { 19 namespace blink {
20 class WebLocalFrame; 20 class WebLocalFrame;
21 } 21 }
(...skipping 24 matching lines...) Expand all
46 PermissionsData::AccessType CanExecuteOnFrame( 46 PermissionsData::AccessType CanExecuteOnFrame(
47 const InjectionHost* injection_host, 47 const InjectionHost* injection_host,
48 blink::WebLocalFrame* web_frame, 48 blink::WebLocalFrame* web_frame,
49 int tab_id) const override; 49 int tab_id) const override;
50 std::vector<blink::WebScriptSource> GetJsSources( 50 std::vector<blink::WebScriptSource> GetJsSources(
51 UserScript::RunLocation run_location) const override; 51 UserScript::RunLocation run_location) const override;
52 std::vector<std::string> GetCssSources( 52 std::vector<std::string> GetCssSources(
53 UserScript::RunLocation run_location) const override; 53 UserScript::RunLocation run_location) const override;
54 void GetRunInfo(ScriptsRunInfo* scripts_run_info, 54 void GetRunInfo(ScriptsRunInfo* scripts_run_info,
55 UserScript::RunLocation run_location) const override; 55 UserScript::RunLocation run_location) const override;
56 void OnInjectionComplete(scoped_ptr<base::Value> execution_result, 56 void OnInjectionComplete(std::unique_ptr<base::Value> execution_result,
57 UserScript::RunLocation run_location, 57 UserScript::RunLocation run_location,
58 content::RenderFrame* render_frame) override; 58 content::RenderFrame* render_frame) override;
59 void OnWillNotInject(InjectFailureReason reason, 59 void OnWillNotInject(InjectFailureReason reason,
60 content::RenderFrame* render_frame) override; 60 content::RenderFrame* render_frame) override;
61 61
62 // The associated user script. Owned by the UserScriptInjector that created 62 // The associated user script. Owned by the UserScriptInjector that created
63 // this object. 63 // this object.
64 const UserScript* script_; 64 const UserScript* script_;
65 65
66 // The id of the associated user script. We cache this because when we update 66 // The id of the associated user script. We cache this because when we update
(...skipping 10 matching lines...) Expand all
77 77
78 ScopedObserver<UserScriptSet, UserScriptSet::Observer> 78 ScopedObserver<UserScriptSet, UserScriptSet::Observer>
79 user_script_set_observer_; 79 user_script_set_observer_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector); 81 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector);
82 }; 82 };
83 83
84 } // namespace extensions 84 } // namespace extensions
85 85
86 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ 86 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
OLDNEW
« no previous file with comments | « extensions/renderer/test_features_native_handler.cc ('k') | extensions/renderer/user_script_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698