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 13 matching lines...) Expand all Loading... |
24 | 24 |
25 namespace extensions { | 25 namespace extensions { |
26 class Extension; | 26 class Extension; |
27 | 27 |
28 // Base class for all ContentActions of the declarative content API. | 28 // Base class for all ContentActions of the declarative content API. |
29 class ContentAction : public base::RefCounted<ContentAction> { | 29 class ContentAction : public base::RefCounted<ContentAction> { |
30 public: | 30 public: |
31 // Type identifiers for concrete ContentActions. | 31 // Type identifiers for concrete ContentActions. |
32 enum Type { | 32 enum Type { |
33 ACTION_SHOW_PAGE_ACTION, | 33 ACTION_SHOW_PAGE_ACTION, |
| 34 ACTION_REQUEST_CONTENT_SCRIPT, |
34 }; | 35 }; |
35 | 36 |
36 struct ApplyInfo { | 37 struct ApplyInfo { |
37 Profile* profile; | 38 Profile* profile; |
38 content::WebContents* tab; | 39 content::WebContents* tab; |
39 }; | 40 }; |
40 | 41 |
41 ContentAction(); | 42 ContentAction(); |
42 | 43 |
43 virtual Type GetType() const = 0; | 44 virtual Type GetType() const = 0; |
(...skipping 22 matching lines...) Expand all Loading... |
66 protected: | 67 protected: |
67 friend class base::RefCounted<ContentAction>; | 68 friend class base::RefCounted<ContentAction>; |
68 virtual ~ContentAction(); | 69 virtual ~ContentAction(); |
69 }; | 70 }; |
70 | 71 |
71 typedef DeclarativeActionSet<ContentAction> ContentActionSet; | 72 typedef DeclarativeActionSet<ContentAction> ContentActionSet; |
72 | 73 |
73 } // namespace extensions | 74 } // namespace extensions |
74 | 75 |
75 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ | 76 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ |
OLD | NEW |