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

Side by Side Diff: chrome/browser/extensions/api/declarative_content/content_action.h

Issue 2227193002: Make UserScript non-copyable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott Created 4 years, 4 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_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Implementation of ContentAction: 97 // Implementation of ContentAction:
98 void Apply(const ApplyInfo& apply_info) const override; 98 void Apply(const ApplyInfo& apply_info) const override;
99 void Reapply(const ApplyInfo& apply_info) const override; 99 void Reapply(const ApplyInfo& apply_info) const override;
100 void Revert(const ApplyInfo& apply_info) const override; 100 void Revert(const ApplyInfo& apply_info) const override;
101 101
102 private: 102 private:
103 void InitScript(const HostID& host_id, 103 void InitScript(const HostID& host_id,
104 const Extension* extension, 104 const Extension* extension,
105 const ScriptData& script_data); 105 const ScriptData& script_data);
106 106
107 void AddScript() { 107 void AddScript();
108 DCHECK(master_);
109 master_->AddScript(script_);
110 }
111 108
112 void InstructRenderProcessToInject(content::WebContents* contents, 109 void InstructRenderProcessToInject(content::WebContents* contents,
113 const Extension* extension) const; 110 const Extension* extension) const;
114 111
115 UserScript script_; 112 UserScript script_;
116 DeclarativeUserScriptMaster* master_; 113 DeclarativeUserScriptMaster* master_;
117 114
118 DISALLOW_COPY_AND_ASSIGN(RequestContentScript); 115 DISALLOW_COPY_AND_ASSIGN(RequestContentScript);
119 }; 116 };
120 117
121 } // namespace extensions 118 } // namespace extensions
122 119
123 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ 120 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698