| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 const GURL& requesting_frame, | 136 const GURL& requesting_frame, |
| 137 const MIDISysExPermissionCallback& callback) = 0; | 137 const MIDISysExPermissionCallback& callback) = 0; |
| 138 | 138 |
| 139 // Cancels a pending MIDI permission request. | 139 // Cancels a pending MIDI permission request. |
| 140 virtual void CancelMIDISysExPermissionRequest( | 140 virtual void CancelMIDISysExPermissionRequest( |
| 141 int render_process_id, | 141 int render_process_id, |
| 142 int render_view_id, | 142 int render_view_id, |
| 143 int bridge_id, | 143 int bridge_id, |
| 144 const GURL& requesting_frame) = 0; | 144 const GURL& requesting_frame) = 0; |
| 145 | 145 |
| 146 typedef base::Callback<void(bool)> ProtectedMediaIdentifierPermissionCallback; |
| 147 |
| 148 // Request permission to access protected media identifier. The callback will |
| 149 // tell whether it's permitted. |
| 150 virtual void RequestProtectedMediaIdentifierPermission( |
| 151 int render_process_id, |
| 152 int render_view_id, |
| 153 int bridge_id, |
| 154 int group_id, |
| 155 const GURL& requesting_frame, |
| 156 const ProtectedMediaIdentifierPermissionCallback& callback) = 0; |
| 157 |
| 158 // Cancels pending protected media identifier permission requests. |
| 159 virtual void CancelProtectedMediaIdentifierPermissionRequests( |
| 160 int group_id) = 0; |
| 161 |
| 146 // Returns the resource context. | 162 // Returns the resource context. |
| 147 virtual ResourceContext* GetResourceContext() = 0; | 163 virtual ResourceContext* GetResourceContext() = 0; |
| 148 | 164 |
| 149 // Returns the DownloadManagerDelegate for this context. This will be called | 165 // Returns the DownloadManagerDelegate for this context. This will be called |
| 150 // once per context. The embedder owns the delegate and is responsible for | 166 // once per context. The embedder owns the delegate and is responsible for |
| 151 // ensuring that it outlives DownloadManager. It's valid to return NULL. | 167 // ensuring that it outlives DownloadManager. It's valid to return NULL. |
| 152 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0; | 168 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0; |
| 153 | 169 |
| 154 // Returns the geolocation permission context for this context. It's valid to | 170 // Returns the geolocation permission context for this context. It's valid to |
| 155 // return NULL, in which case geolocation requests will always be allowed. | 171 // return NULL, in which case geolocation requests will always be allowed. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 168 struct hash<content::BrowserContext*> { | 184 struct hash<content::BrowserContext*> { |
| 169 std::size_t operator()(content::BrowserContext* const& p) const { | 185 std::size_t operator()(content::BrowserContext* const& p) const { |
| 170 return reinterpret_cast<std::size_t>(p); | 186 return reinterpret_cast<std::size_t>(p); |
| 171 } | 187 } |
| 172 }; | 188 }; |
| 173 | 189 |
| 174 } // namespace BASE_HASH_NAMESPACE | 190 } // namespace BASE_HASH_NAMESPACE |
| 175 #endif | 191 #endif |
| 176 | 192 |
| 177 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 193 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |