| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MANIFEST_HANDLERS_AUTOMATION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_AUTOMATION_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_AUTOMATION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_AUTOMATION_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Returns the list of hosts that this extension can request an automation | 52 // Returns the list of hosts that this extension can request an automation |
| 53 // tree from. | 53 // tree from. |
| 54 const URLPatternSet matches; | 54 const URLPatternSet matches; |
| 55 | 55 |
| 56 // Whether the extension is allowed interactive access (true) or read-only | 56 // Whether the extension is allowed interactive access (true) or read-only |
| 57 // access (false) to the automation tree. | 57 // access (false) to the automation tree. |
| 58 const bool interact; | 58 const bool interact; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 AutomationInfo(); | 61 AutomationInfo(); |
| 62 AutomationInfo(bool desktop, URLPatternSet matches, bool interact); | 62 AutomationInfo(bool desktop, const URLPatternSet& matches, bool interact); |
| 63 | 63 |
| 64 static std::unique_ptr<api::manifest_types::Automation> AsManifestType( | 64 static std::unique_ptr<api::manifest_types::Automation> AsManifestType( |
| 65 const AutomationInfo& info); | 65 const AutomationInfo& info); |
| 66 | 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(AutomationInfo); | 67 DISALLOW_COPY_AND_ASSIGN(AutomationInfo); |
| 68 friend class AutomationManifestPermission; | 68 friend class AutomationManifestPermission; |
| 69 friend class AutomationHandler; | 69 friend class AutomationHandler; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 // Parses the automation manifest entry. | 72 // Parses the automation manifest entry. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 83 ManifestPermission* CreateInitialRequiredPermission( | 83 ManifestPermission* CreateInitialRequiredPermission( |
| 84 const Extension* extension) override; | 84 const Extension* extension) override; |
| 85 const std::vector<std::string> Keys() const override; | 85 const std::vector<std::string> Keys() const override; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(AutomationHandler); | 87 DISALLOW_COPY_AND_ASSIGN(AutomationHandler); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace extensions | 90 } // namespace extensions |
| 91 | 91 |
| 92 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_AUTOMATION_H_ | 92 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_AUTOMATION_H_ |
| OLD | NEW |