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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // previous page also matched relevant conditions. | 49 // previous page also matched relevant conditions. |
50 virtual void Apply(const std::string& extension_id, | 50 virtual void Apply(const std::string& extension_id, |
51 const base::Time& extension_install_time, | 51 const base::Time& extension_install_time, |
52 ApplyInfo* apply_info) const = 0; | 52 ApplyInfo* apply_info) const = 0; |
53 virtual void Reapply(const std::string& extension_id, | 53 virtual void Reapply(const std::string& extension_id, |
54 const base::Time& extension_install_time, | 54 const base::Time& extension_install_time, |
55 ApplyInfo* apply_info) const = 0; | 55 ApplyInfo* apply_info) const = 0; |
56 virtual void Revert(const std::string& extension_id, | 56 virtual void Revert(const std::string& extension_id, |
57 const base::Time& extension_install_time, | 57 const base::Time& extension_install_time, |
58 ApplyInfo* apply_info) const = 0; | 58 ApplyInfo* apply_info) const = 0; |
| 59 virtual void Reapply(const std::string& extension_id, |
| 60 const base::Time& extension_install_time, |
| 61 ApplyInfo* apply_info) const = 0; |
59 | 62 |
60 // Factory method that instantiates a concrete ContentAction | 63 // Factory method that instantiates a concrete ContentAction |
61 // implementation according to |json_action|, the representation of the | 64 // implementation according to |json_action|, the representation of the |
62 // ContentAction as received from the extension API. | 65 // ContentAction as received from the extension API. |
63 // Sets |error| and returns NULL in case of a semantic error that cannot | 66 // Sets |error| and returns NULL in case of a semantic error that cannot |
64 // be caught by schema validation. Sets |bad_message| and returns NULL | 67 // be caught by schema validation. Sets |bad_message| and returns NULL |
65 // in case the input is syntactically unexpected. | 68 // in case the input is syntactically unexpected. |
66 static scoped_refptr<ContentAction> Create(const Extension* extension, | 69 static scoped_refptr<ContentAction> Create(Profile* profile, |
| 70 const Extension* extension, |
67 const base::Value& json_action, | 71 const base::Value& json_action, |
68 std::string* error, | 72 std::string* error, |
69 bool* bad_message); | 73 bool* bad_message); |
70 | 74 |
71 protected: | 75 protected: |
72 friend class base::RefCounted<ContentAction>; | 76 friend class base::RefCounted<ContentAction>; |
73 virtual ~ContentAction(); | 77 virtual ~ContentAction(); |
74 }; | 78 }; |
75 | 79 |
76 typedef DeclarativeActionSet<ContentAction> ContentActionSet; | 80 typedef DeclarativeActionSet<ContentAction> ContentActionSet; |
77 | 81 |
78 } // namespace extensions | 82 } // namespace extensions |
79 | 83 |
80 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ | 84 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ |
OLD | NEW |