| Index: extensions/renderer/renderer_user_script.h
|
| diff --git a/extensions/renderer/renderer_user_script.h b/extensions/renderer/renderer_user_script.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4ddb56555c3eff834d03c9f689f007f62f9ab7fd
|
| --- /dev/null
|
| +++ b/extensions/renderer/renderer_user_script.h
|
| @@ -0,0 +1,48 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef EXTENSIONS_RENDERER_RENDERER_USER_SCRIPT_H_
|
| +#define EXTENSIONS_RENDERER_RENDERER_USER_SCRIPT_H_
|
| +
|
| +#include "extensions/common/user_script.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +// renderer/ process representation of a user script file.
|
| +// The content it points to is owned by some shared memory.
|
| +class RendererScriptFile : public UserScriptFileInfo {
|
| + public:
|
| + RendererScriptFile();
|
| + RendererScriptFile(const UserScriptFileInfo& info);
|
| + ~RendererScriptFile() override;
|
| +
|
| + void set_external_content(base::StringPiece content) { content_ = content; }
|
| + base::StringPiece GetContent() { return content_; }
|
| +
|
| + private:
|
| + base::StringPiece content_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(RendererScriptFile);
|
| +};
|
| +
|
| +// renderer/ process representation of a user script.
|
| +// A user script can contain multiple script files in it. The renderer/ process
|
| +// gets the contents of these files via shared memory.
|
| +class RendererUserScript : public UserScriptInfo,
|
| + public UserScriptFiles<RendererScriptFile> {
|
| + public:
|
| + RendererUserScript();
|
| + RendererUserScript(const UserScriptInfo& meta,
|
| + const UserScriptFiles<UserScriptFileInfo>& files);
|
| + ~RendererUserScript() override;
|
| +
|
| + void Unpickle(const base::Pickle& pickle, base::PickleIterator* iter);
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(RendererUserScript);
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // EXTENSIONS_RENDERER_RENDERER_USER_SCRIPT_H_
|
|
|