| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
| 6 #define CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 6 #define CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
| 7 | 7 |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const base::FilePath& file) override; | 66 const base::FilePath& file) override; |
| 67 bool CanReadFileSystem(int child_id, | 67 bool CanReadFileSystem(int child_id, |
| 68 const std::string& filesystem_id) override; | 68 const std::string& filesystem_id) override; |
| 69 bool CanReadWriteFileSystem(int child_id, | 69 bool CanReadWriteFileSystem(int child_id, |
| 70 const std::string& filesystem_id) override; | 70 const std::string& filesystem_id) override; |
| 71 bool CanCopyIntoFileSystem(int child_id, | 71 bool CanCopyIntoFileSystem(int child_id, |
| 72 const std::string& filesystem_id) override; | 72 const std::string& filesystem_id) override; |
| 73 bool CanDeleteFromFileSystem(int child_id, | 73 bool CanDeleteFromFileSystem(int child_id, |
| 74 const std::string& filesystem_id) override; | 74 const std::string& filesystem_id) override; |
| 75 bool HasWebUIBindings(int child_id) override; | 75 bool HasWebUIBindings(int child_id) override; |
| 76 void GrantSendMidiSysExMessage(int child_id) override; |
| 76 | 77 |
| 77 // Pseudo schemes are treated differently than other schemes because they | 78 // Pseudo schemes are treated differently than other schemes because they |
| 78 // cannot be requested like normal URLs. There is no mechanism for revoking | 79 // cannot be requested like normal URLs. There is no mechanism for revoking |
| 79 // pseudo schemes. | 80 // pseudo schemes. |
| 80 void RegisterPseudoScheme(const std::string& scheme); | 81 void RegisterPseudoScheme(const std::string& scheme); |
| 81 | 82 |
| 82 // Returns true iff |scheme| has been registered as pseudo scheme. | 83 // Returns true iff |scheme| has been registered as pseudo scheme. |
| 83 bool IsPseudoScheme(const std::string& scheme); | 84 bool IsPseudoScheme(const std::string& scheme); |
| 84 | 85 |
| 85 // Upon creation, child processes should register themselves by calling this | 86 // Upon creation, child processes should register themselves by calling this |
| (...skipping 26 matching lines...) Expand all Loading... |
| 112 | 113 |
| 113 // Grant the child process the ability to use Web UI Bindings. | 114 // Grant the child process the ability to use Web UI Bindings. |
| 114 void GrantWebUIBindings(int child_id); | 115 void GrantWebUIBindings(int child_id); |
| 115 | 116 |
| 116 // Grant the child process the ability to read raw cookies. | 117 // Grant the child process the ability to read raw cookies. |
| 117 void GrantReadRawCookies(int child_id); | 118 void GrantReadRawCookies(int child_id); |
| 118 | 119 |
| 119 // Revoke read raw cookies permission. | 120 // Revoke read raw cookies permission. |
| 120 void RevokeReadRawCookies(int child_id); | 121 void RevokeReadRawCookies(int child_id); |
| 121 | 122 |
| 122 // Grants permission to send system exclusive message to any MIDI devices. | |
| 123 void GrantSendMidiSysExMessage(int child_id); | |
| 124 | |
| 125 // Before servicing a child process's request for a URL, the browser should | 123 // Before servicing a child process's request for a URL, the browser should |
| 126 // call this method to determine whether the process has the capability to | 124 // call this method to determine whether the process has the capability to |
| 127 // request the URL. | 125 // request the URL. |
| 128 bool CanRequestURL(int child_id, const GURL& url); | 126 bool CanRequestURL(int child_id, const GURL& url); |
| 129 | 127 |
| 130 // Returns true if the process is permitted to load pages from | 128 // Returns true if the process is permitted to load pages from |
| 131 // the given origin in main frames or subframes. | 129 // the given origin in main frames or subframes. |
| 132 // Only might return false if --site-per-process flag is used. | 130 // Only might return false if --site-per-process flag is used. |
| 133 bool CanLoadPage(int child_id, | 131 bool CanLoadPage(int child_id, |
| 134 const GURL& url, | 132 const GURL& url, |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 WorkerToMainProcessMap worker_map_; | 259 WorkerToMainProcessMap worker_map_; |
| 262 | 260 |
| 263 FileSystemPermissionPolicyMap file_system_policy_map_; | 261 FileSystemPermissionPolicyMap file_system_policy_map_; |
| 264 | 262 |
| 265 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); | 263 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); |
| 266 }; | 264 }; |
| 267 | 265 |
| 268 } // namespace content | 266 } // namespace content |
| 269 | 267 |
| 270 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 268 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
| OLD | NEW |