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