| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RENDERER_EXTENSIONS_RENDERER_PERMISSIONS_POLICY_DELEGATE_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_RENDERER_PERMISSIONS_POLICY_DELEGATE_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_RENDERER_PERMISSIONS_POLICY_DELEGATE_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_RENDERER_PERMISSIONS_POLICY_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "extensions/common/permissions/permissions_data.h" | 8 #include "extensions/common/permissions/permissions_data.h" |
| 9 | 9 |
| 10 namespace extensions { | 10 namespace extensions { |
| 11 | 11 |
| 12 class Dispatcher; | 12 class Dispatcher; |
| 13 | 13 |
| 14 // Policy delegate for the renderer process. | 14 // Policy delegate for the renderer process. |
| 15 class RendererPermissionsPolicyDelegate | 15 class RendererPermissionsPolicyDelegate |
| 16 : public PermissionsData::PolicyDelegate { | 16 : public PermissionsData::PolicyDelegate { |
| 17 public: | 17 public: |
| 18 explicit RendererPermissionsPolicyDelegate(Dispatcher* dispatcher); | 18 explicit RendererPermissionsPolicyDelegate(Dispatcher* dispatcher); |
| 19 ~RendererPermissionsPolicyDelegate() override; | 19 ~RendererPermissionsPolicyDelegate() override; |
| 20 | 20 |
| 21 bool CanExecuteScriptOnPage(const Extension* extension, | 21 bool CanExecuteScriptOnPage(const Extension* extension, |
| 22 const GURL& document_url, | 22 const GURL& document_url, |
| 23 const GURL& top_document_url, | |
| 24 int tab_id, | 23 int tab_id, |
| 25 int process_id, | 24 int process_id, |
| 26 std::string* error) override; | 25 std::string* error) override; |
| 27 | 26 |
| 28 private: | 27 private: |
| 29 Dispatcher* dispatcher_; | 28 Dispatcher* dispatcher_; |
| 30 | 29 |
| 31 DISALLOW_COPY_AND_ASSIGN(RendererPermissionsPolicyDelegate); | 30 DISALLOW_COPY_AND_ASSIGN(RendererPermissionsPolicyDelegate); |
| 32 }; | 31 }; |
| 33 | 32 |
| 34 } // namespace extensions | 33 } // namespace extensions |
| 35 | 34 |
| 36 #endif // CHROME_RENDERER_EXTENSIONS_RENDERER_PERMISSIONS_POLICY_DELEGATE_H_ | 35 #endif // CHROME_RENDERER_EXTENSIONS_RENDERER_PERMISSIONS_POLICY_DELEGATE_H_ |
| OLD | NEW |