OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_DOM_ACTIONS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_DOM_ACTIONS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_DOM_ACTIONS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_DOM_ACTIONS_H_ |
7 | 7 |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "chrome/browser/extensions/activity_actions.h" | 9 #include "chrome/browser/extensions/activity_actions.h" |
10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
11 | 11 |
12 namespace extensions { | 12 namespace extensions { |
13 | 13 |
14 // This class describes extension actions that pertain to DOM API calls and | 14 // This class describes extension actions that pertain to DOM API calls and |
15 // content script insertions. | 15 // content script insertions. |
16 class DOMAction : public Action { | 16 class DOMAction : public Action { |
17 public: | 17 public: |
18 enum DOMActionType { | 18 enum DOMActionType { |
19 MODIFIED, // For Content Script DOM manipulations | 19 MODIFIED, // For Content Script DOM manipulations |
20 READ, // For Content Script DOM manipulations | 20 READ, // For Content Script DOM manipulations |
21 INSERTED, // For when Content Scripts are added to pages | 21 INSERTED, // For when Content Scripts are added to pages |
22 XHR, // When an extension core sends an XHR | 22 XHR, // When an extension core sends an XHR |
| 23 WEBREQUEST, // When a page request is modified with the WebRequest API |
23 }; | 24 }; |
24 | 25 |
25 static const char* kTableName; | 26 static const char* kTableName; |
26 static const char* kTableContentFields[]; | 27 static const char* kTableContentFields[]; |
27 | 28 |
28 // Create a new database table for storing DOMActions, or update the schema if | 29 // Create a new database table for storing DOMActions, or update the schema if |
29 // it is out of date. Any existing data is preserved. | 30 // it is out of date. Any existing data is preserved. |
30 static bool InitializeTable(sql::Connection* db); | 31 static bool InitializeTable(sql::Connection* db); |
31 | 32 |
32 // Create a new DOMAction to describe a new DOM API call. | 33 // Create a new DOMAction to describe a new DOM API call. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 std::string args_; | 78 std::string args_; |
78 std::string extra_; | 79 std::string extra_; |
79 | 80 |
80 DISALLOW_COPY_AND_ASSIGN(DOMAction); | 81 DISALLOW_COPY_AND_ASSIGN(DOMAction); |
81 }; | 82 }; |
82 | 83 |
83 } // namespace extensions | 84 } // namespace extensions |
84 | 85 |
85 #endif // CHROME_BROWSER_EXTENSIONS_DOM_ACTIONS_H_ | 86 #endif // CHROME_BROWSER_EXTENSIONS_DOM_ACTIONS_H_ |
86 | 87 |
OLD | NEW |