| 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_COMMON_EXTENSIONS_USER_SCRIPT_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ | 6 #define CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 12 #include "base/string_piece.h" | 12 #include "base/string_piece.h" |
| 13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 14 #include "chrome/common/extensions/url_pattern.h" | 14 #include "chrome/common/extensions/url_pattern.h" |
| 15 #include "chrome/common/extensions/url_pattern_set.h" | 15 #include "chrome/common/extensions/url_pattern_set.h" |
| 16 | 16 |
| 17 class Pickle; | 17 class Pickle; |
| 18 class PickleIterator; | 18 class PickleIterator; |
| 19 | 19 |
| 20 namespace extensions { |
| 21 |
| 20 // Represents a user script, either a standalone one, or one that is part of an | 22 // Represents a user script, either a standalone one, or one that is part of an |
| 21 // extension. | 23 // extension. |
| 22 class UserScript { | 24 class UserScript { |
| 23 public: | 25 public: |
| 24 // The file extension for standalone user scripts. | 26 // The file extension for standalone user scripts. |
| 25 static const char kFileExtension[]; | 27 static const char kFileExtension[]; |
| 26 | 28 |
| 27 // The bitmask for valid user script injectable schemes used by URLPattern. | 29 // The bitmask for valid user script injectable schemes used by URLPattern. |
| 28 enum { | 30 enum { |
| 29 kValidUserScriptSchemes = URLPattern::SCHEME_HTTP | | 31 kValidUserScriptSchemes = URLPattern::SCHEME_HTTP | |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // Whether the user script should run in all frames, or only just the top one. | 251 // Whether the user script should run in all frames, or only just the top one. |
| 250 // Defaults to false. | 252 // Defaults to false. |
| 251 bool match_all_frames_; | 253 bool match_all_frames_; |
| 252 | 254 |
| 253 // True if the script should be injected into an incognito tab. | 255 // True if the script should be injected into an incognito tab. |
| 254 bool incognito_enabled_; | 256 bool incognito_enabled_; |
| 255 }; | 257 }; |
| 256 | 258 |
| 257 typedef std::vector<UserScript> UserScriptList; | 259 typedef std::vector<UserScript> UserScriptList; |
| 258 | 260 |
| 261 } // namespace extensions |
| 262 |
| 259 #endif // CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ | 263 #endif // CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ |
| OLD | NEW |