Home | History | Annotate | Download | only in extensions

Lines Matching refs:script

38     *error = "User script must be UTF8 encoded.";
42 UserScript script;
44 &script)) {
45 *error = "Invalid script header.";
64 if (!script.name().empty() && !script.name_space().empty())
65 script_name = script.name_space() + "/" + script.name();
71 // its unique identity, and we need one of those. A user script's unique
80 // The script may not have a name field, but we need one for an extension. If
82 if (!script.name().empty())
83 root->SetString(keys::kName, script.name());
89 if (!script.version().empty())
90 root->SetString(keys::kVersion, script.version());
94 root->SetString(keys::kDescription, script.description());
99 js_files->Append(Value::CreateStringValue("script.js"));
101 // If the script provides its own match patterns, we use those. Otherwise, we
104 if (!script.url_patterns().empty()) {
105 for (size_t i = 0; i < script.url_patterns().size(); ++i) {
107 script.url_patterns()[i].GetAsString()));
116 for (size_t i = 0; i < script.globs().size(); ++i)
117 includes->Append(Value::CreateStringValue(script.globs().at(i)));
120 for (size_t i = 0; i < script.exclude_globs().size(); ++i)
121 excludes->Append(Value::CreateStringValue(script.exclude_globs().at(i)));
142 // Write the script file.
144 temp_dir.path().AppendASCII("script.js"))) {
145 *error = "Could not copy script file.";