| 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 #include "chrome/common/extensions/manifest_handlers/automation.h" | 5 #include "chrome/common/extensions/manifest_handlers/automation.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/common/extensions/api/manifest_types.h" | 8 #include "chrome/common/extensions/api/manifest_types.h" |
| 9 #include "chrome/grit/generated_resources.h" | 9 #include "chrome/grit/generated_resources.h" |
| 10 #include "extensions/common/error_utils.h" | 10 #include "extensions/common/error_utils.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 namespace keys = extensions::manifest_keys; | 37 namespace keys = extensions::manifest_keys; |
| 38 using api::manifest_types::Automation; | 38 using api::manifest_types::Automation; |
| 39 | 39 |
| 40 class AutomationManifestPermission : public ManifestPermission { | 40 class AutomationManifestPermission : public ManifestPermission { |
| 41 public: | 41 public: |
| 42 explicit AutomationManifestPermission( | 42 explicit AutomationManifestPermission( |
| 43 scoped_ptr<const AutomationInfo> automation_info) | 43 scoped_ptr<const AutomationInfo> automation_info) |
| 44 : automation_info_(automation_info.Pass()) {} | 44 : automation_info_(automation_info.Pass()) {} |
| 45 | 45 |
| 46 // extensions::ManifestPermission overrides. | 46 // extensions::ManifestPermission overrides. |
| 47 virtual std::string name() const OVERRIDE; | 47 virtual std::string name() const override; |
| 48 | 48 |
| 49 virtual std::string id() const OVERRIDE; | 49 virtual std::string id() const override; |
| 50 | 50 |
| 51 virtual bool HasMessages() const OVERRIDE; | 51 virtual bool HasMessages() const override; |
| 52 | 52 |
| 53 virtual PermissionMessages GetMessages() const OVERRIDE; | 53 virtual PermissionMessages GetMessages() const override; |
| 54 | 54 |
| 55 virtual bool FromValue(const base::Value* value) OVERRIDE; | 55 virtual bool FromValue(const base::Value* value) override; |
| 56 | 56 |
| 57 virtual scoped_ptr<base::Value> ToValue() const OVERRIDE; | 57 virtual scoped_ptr<base::Value> ToValue() const override; |
| 58 | 58 |
| 59 virtual ManifestPermission* Diff( | 59 virtual ManifestPermission* Diff( |
| 60 const ManifestPermission* rhs) const OVERRIDE; | 60 const ManifestPermission* rhs) const override; |
| 61 | 61 |
| 62 virtual ManifestPermission* Union( | 62 virtual ManifestPermission* Union( |
| 63 const ManifestPermission* rhs) const OVERRIDE; | 63 const ManifestPermission* rhs) const override; |
| 64 | 64 |
| 65 virtual ManifestPermission* Intersect( | 65 virtual ManifestPermission* Intersect( |
| 66 const ManifestPermission* rhs) const OVERRIDE; | 66 const ManifestPermission* rhs) const override; |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 scoped_ptr<const AutomationInfo> automation_info_; | 69 scoped_ptr<const AutomationInfo> automation_info_; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 std::string AutomationManifestPermission::name() const { | 72 std::string AutomationManifestPermission::name() const { |
| 73 return keys::kAutomation; | 73 return keys::kAutomation; |
| 74 } | 74 } |
| 75 | 75 |
| 76 std::string AutomationManifestPermission::id() const { | 76 std::string AutomationManifestPermission::id() const { |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 AutomationInfo::AutomationInfo(bool desktop, | 315 AutomationInfo::AutomationInfo(bool desktop, |
| 316 const URLPatternSet matches, | 316 const URLPatternSet matches, |
| 317 bool interact) | 317 bool interact) |
| 318 : desktop(desktop), matches(matches), interact(interact) { | 318 : desktop(desktop), matches(matches), interact(interact) { |
| 319 } | 319 } |
| 320 | 320 |
| 321 AutomationInfo::~AutomationInfo() { | 321 AutomationInfo::~AutomationInfo() { |
| 322 } | 322 } |
| 323 | 323 |
| 324 } // namespace extensions | 324 } // namespace extensions |
| OLD | NEW |