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 #include "content/shell/shell_browser_context.h" | 5 #include "content/shell/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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 const base::FilePath& partition_path, | 168 const base::FilePath& partition_path, |
169 bool in_memory) { | 169 bool in_memory) { |
170 return GetRequestContext(); | 170 return GetRequestContext(); |
171 } | 171 } |
172 | 172 |
173 void ShellBrowserContext::RequestMIDISysExPermission( | 173 void ShellBrowserContext::RequestMIDISysExPermission( |
174 int render_process_id, | 174 int render_process_id, |
175 int render_view_id, | 175 int render_view_id, |
176 const GURL& requesting_frame, | 176 const GURL& requesting_frame, |
177 const MIDISysExPermissionCallback& callback) { | 177 const MIDISysExPermissionCallback& callback) { |
178 // Always reject requests for testing. | 178 // Always reject requests for LayoutTests for now. |
179 // TODO(toyoshim): Make it programmable to improve test coverage. | 179 // TODO(toyoshim): Make it programmable to improve test coverage. |
| 180 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { |
| 181 callback.Run(false); |
| 182 return; |
| 183 } |
| 184 // TODO(toyoshim): Implement. http://crbug.com/257618 . |
180 callback.Run(false); | 185 callback.Run(false); |
181 } | 186 } |
182 | 187 |
183 net::URLRequestContextGetter* | 188 net::URLRequestContextGetter* |
184 ShellBrowserContext::CreateRequestContextForStoragePartition( | 189 ShellBrowserContext::CreateRequestContextForStoragePartition( |
185 const base::FilePath& partition_path, | 190 const base::FilePath& partition_path, |
186 bool in_memory, | 191 bool in_memory, |
187 ProtocolHandlerMap* protocol_handlers) { | 192 ProtocolHandlerMap* protocol_handlers) { |
188 return NULL; | 193 return NULL; |
189 } | 194 } |
190 | 195 |
191 ResourceContext* ShellBrowserContext::GetResourceContext() { | 196 ResourceContext* ShellBrowserContext::GetResourceContext() { |
192 return resource_context_.get(); | 197 return resource_context_.get(); |
193 } | 198 } |
194 | 199 |
195 GeolocationPermissionContext* | 200 GeolocationPermissionContext* |
196 ShellBrowserContext::GetGeolocationPermissionContext() { | 201 ShellBrowserContext::GetGeolocationPermissionContext() { |
197 return NULL; | 202 return NULL; |
198 } | 203 } |
199 | 204 |
200 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { | 205 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { |
201 return NULL; | 206 return NULL; |
202 } | 207 } |
203 | 208 |
204 } // namespace content | 209 } // namespace content |
OLD | NEW |