| OLD | NEW |
| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 std::string* instance_type); | 85 std::string* instance_type); |
| 86 | 86 |
| 87 protected: | 87 protected: |
| 88 friend class base::RefCounted<ContentAction>; | 88 friend class base::RefCounted<ContentAction>; |
| 89 virtual ~ContentAction(); | 89 virtual ~ContentAction(); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 // Action that injects a content script. | 92 // Action that injects a content script. |
| 93 class RequestContentScript : public ContentAction { | 93 class RequestContentScript : public ContentAction { |
| 94 public: | 94 public: |
| 95 struct ScriptData { | 95 struct ScriptData; |
| 96 ScriptData(); | |
| 97 ~ScriptData(); | |
| 98 | |
| 99 std::vector<std::string> css_file_names; | |
| 100 std::vector<std::string> js_file_names; | |
| 101 bool all_frames; | |
| 102 bool match_about_blank; | |
| 103 }; | |
| 104 | 96 |
| 105 RequestContentScript(content::BrowserContext* browser_context, | 97 RequestContentScript(content::BrowserContext* browser_context, |
| 106 const Extension* extension, | 98 const Extension* extension, |
| 107 const ScriptData& script_data); | 99 const ScriptData& script_data); |
| 108 RequestContentScript(DeclarativeUserScriptMaster* master, | 100 RequestContentScript(DeclarativeUserScriptMaster* master, |
| 109 const Extension* extension, | 101 const Extension* extension, |
| 110 const ScriptData& script_data); | 102 const ScriptData& script_data); |
| 111 | 103 |
| 112 static scoped_refptr<ContentAction> Create( | 104 static scoped_refptr<ContentAction> Create( |
| 113 content::BrowserContext* browser_context, | 105 content::BrowserContext* browser_context, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 DeclarativeUserScriptMaster* master_; | 152 DeclarativeUserScriptMaster* master_; |
| 161 | 153 |
| 162 DISALLOW_COPY_AND_ASSIGN(RequestContentScript); | 154 DISALLOW_COPY_AND_ASSIGN(RequestContentScript); |
| 163 }; | 155 }; |
| 164 | 156 |
| 165 typedef DeclarativeActionSet<ContentAction> ContentActionSet; | 157 typedef DeclarativeActionSet<ContentAction> ContentActionSet; |
| 166 | 158 |
| 167 } // namespace extensions | 159 } // namespace extensions |
| 168 | 160 |
| 169 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ | 161 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ |
| OLD | NEW |