| 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 #include "content/shell/browser/shell_browser_context.h" | 5 #include "content/shell/browser/shell_browser_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 return GetRequestContext(); | 172 return GetRequestContext(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 net::URLRequestContextGetter* | 175 net::URLRequestContextGetter* |
| 176 ShellBrowserContext::GetMediaRequestContextForStoragePartition( | 176 ShellBrowserContext::GetMediaRequestContextForStoragePartition( |
| 177 const base::FilePath& partition_path, | 177 const base::FilePath& partition_path, |
| 178 bool in_memory) { | 178 bool in_memory) { |
| 179 return GetRequestContext(); | 179 return GetRequestContext(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void ShellBrowserContext::RequestMidiSysExPermission( | |
| 183 int render_process_id, | |
| 184 int render_view_id, | |
| 185 int bridge_id, | |
| 186 const GURL& requesting_frame, | |
| 187 bool user_gesture, | |
| 188 const MidiSysExPermissionCallback& callback) { | |
| 189 // Always reject requests for LayoutTests for now. | |
| 190 // TODO(toyoshim): Make it programmable to improve test coverage. | |
| 191 if (!CommandLine::ForCurrentProcess()->HasSwitch( | |
| 192 switches::kDumpRenderTree)) { | |
| 193 callback.Run(false); | |
| 194 return; | |
| 195 } | |
| 196 callback.Run(true); | |
| 197 } | |
| 198 | |
| 199 void ShellBrowserContext::CancelMidiSysExPermissionRequest( | |
| 200 int render_process_id, | |
| 201 int render_view_id, | |
| 202 int bridge_id, | |
| 203 const GURL& requesting_frame) { | |
| 204 } | |
| 205 | |
| 206 void ShellBrowserContext::RequestProtectedMediaIdentifierPermission( | 182 void ShellBrowserContext::RequestProtectedMediaIdentifierPermission( |
| 207 int render_process_id, | 183 int render_process_id, |
| 208 int render_view_id, | 184 int render_view_id, |
| 209 const GURL& origin, | 185 const GURL& origin, |
| 210 const ProtectedMediaIdentifierPermissionCallback& callback) { | 186 const ProtectedMediaIdentifierPermissionCallback& callback) { |
| 211 callback.Run(true); | 187 callback.Run(true); |
| 212 } | 188 } |
| 213 | 189 |
| 214 void ShellBrowserContext::CancelProtectedMediaIdentifierPermissionRequests( | 190 void ShellBrowserContext::CancelProtectedMediaIdentifierPermissionRequests( |
| 215 int render_process_id, | 191 int render_process_id, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 236 | 212 |
| 237 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { | 213 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { |
| 238 return NULL; | 214 return NULL; |
| 239 } | 215 } |
| 240 | 216 |
| 241 PushMessagingService* ShellBrowserContext::GetPushMessagingService() { | 217 PushMessagingService* ShellBrowserContext::GetPushMessagingService() { |
| 242 return NULL; | 218 return NULL; |
| 243 } | 219 } |
| 244 | 220 |
| 245 } // namespace content | 221 } // namespace content |
| OLD | NEW |