| 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_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 // Returns the request context for media resources associated with this | 125 // Returns the request context for media resources associated with this |
| 126 // context and renderer process. | 126 // context and renderer process. |
| 127 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 127 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( |
| 128 int renderer_child_id) = 0; | 128 int renderer_child_id) = 0; |
| 129 virtual net::URLRequestContextGetter* | 129 virtual net::URLRequestContextGetter* |
| 130 GetMediaRequestContextForStoragePartition( | 130 GetMediaRequestContextForStoragePartition( |
| 131 const base::FilePath& partition_path, | 131 const base::FilePath& partition_path, |
| 132 bool in_memory) = 0; | 132 bool in_memory) = 0; |
| 133 | 133 |
| 134 typedef base::Callback<void(bool)> MidiSysExPermissionCallback; | |
| 135 | |
| 136 // Requests a permission to use system exclusive messages in MIDI events. | |
| 137 // |callback| will be invoked when the request is resolved. | |
| 138 virtual void RequestMidiSysExPermission( | |
| 139 int render_process_id, | |
| 140 int render_view_id, | |
| 141 int bridge_id, | |
| 142 const GURL& requesting_frame, | |
| 143 bool user_gesture, | |
| 144 const MidiSysExPermissionCallback& callback) = 0; | |
| 145 | |
| 146 // Cancels a pending MIDI permission request. | |
| 147 virtual void CancelMidiSysExPermissionRequest( | |
| 148 int render_process_id, | |
| 149 int render_view_id, | |
| 150 int bridge_id, | |
| 151 const GURL& requesting_frame) = 0; | |
| 152 | |
| 153 typedef base::Callback<void(bool)> ProtectedMediaIdentifierPermissionCallback; | 134 typedef base::Callback<void(bool)> ProtectedMediaIdentifierPermissionCallback; |
| 154 | 135 |
| 155 // Request permission to access protected media identifier. The callback will | 136 // Request permission to access protected media identifier. The callback will |
| 156 // tell whether it's permitted. | 137 // tell whether it's permitted. |
| 157 virtual void RequestProtectedMediaIdentifierPermission( | 138 virtual void RequestProtectedMediaIdentifierPermission( |
| 158 int render_process_id, | 139 int render_process_id, |
| 159 int render_view_id, | 140 int render_view_id, |
| 160 const GURL& origin, | 141 const GURL& origin, |
| 161 const ProtectedMediaIdentifierPermissionCallback& callback) = 0; | 142 const ProtectedMediaIdentifierPermissionCallback& callback) = 0; |
| 162 | 143 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 struct hash<content::BrowserContext*> { | 176 struct hash<content::BrowserContext*> { |
| 196 std::size_t operator()(content::BrowserContext* const& p) const { | 177 std::size_t operator()(content::BrowserContext* const& p) const { |
| 197 return reinterpret_cast<std::size_t>(p); | 178 return reinterpret_cast<std::size_t>(p); |
| 198 } | 179 } |
| 199 }; | 180 }; |
| 200 | 181 |
| 201 } // namespace BASE_HASH_NAMESPACE | 182 } // namespace BASE_HASH_NAMESPACE |
| 202 #endif | 183 #endif |
| 203 | 184 |
| 204 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 185 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |