| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2411 scoped_refptr<media::FilterFactoryCollection> factory = | 2411 scoped_refptr<media::FilterFactoryCollection> factory = |
| 2412 new media::FilterFactoryCollection(); | 2412 new media::FilterFactoryCollection(); |
| 2413 // Add in any custom filter factories first. | 2413 // Add in any custom filter factories first. |
| 2414 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 2414 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 2415 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { | 2415 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { |
| 2416 // Add the chrome specific audio renderer. | 2416 // Add the chrome specific audio renderer. |
| 2417 factory->AddFactory( | 2417 factory->AddFactory( |
| 2418 AudioRendererImpl::CreateFactory(audio_message_filter())); | 2418 AudioRendererImpl::CreateFactory(audio_message_filter())); |
| 2419 } | 2419 } |
| 2420 | 2420 |
| 2421 // TODO(hclam): Need to inject Gles2VideoDecodeContext here. Also I need |
| 2422 // to create a factory for FFmpegVideoDecoder here so that it can use |
| 2423 // the Gles2VideoDecodeContext. |
| 2421 if (cmd_line->HasSwitch(switches::kEnableAcceleratedDecoding) && | 2424 if (cmd_line->HasSwitch(switches::kEnableAcceleratedDecoding) && |
| 2422 cmd_line->HasSwitch(switches::kEnableAcceleratedCompositing)) { | 2425 cmd_line->HasSwitch(switches::kEnableAcceleratedCompositing)) { |
| 2423 // Add the hardware video decoder factory. | 2426 // Add the hardware video decoder factory. |
| 2424 factory->AddFactory( | 2427 factory->AddFactory( |
| 2425 media::IpcVideoDecoder::CreateFactory(MessageLoop::current())); | 2428 media::IpcVideoDecoder::CreateFactory(MessageLoop::current())); |
| 2426 } | 2429 } |
| 2427 | 2430 |
| 2428 WebApplicationCacheHostImpl* appcache_host = | 2431 WebApplicationCacheHostImpl* appcache_host = |
| 2429 WebApplicationCacheHostImpl::FromFrame(frame); | 2432 WebApplicationCacheHostImpl::FromFrame(frame); |
| 2430 | 2433 |
| (...skipping 3220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5651 PendingOpenFileSystem* request = pending_file_system_requests_.Lookup( | 5654 PendingOpenFileSystem* request = pending_file_system_requests_.Lookup( |
| 5652 request_id); | 5655 request_id); |
| 5653 DCHECK(request); | 5656 DCHECK(request); |
| 5654 if (accepted) | 5657 if (accepted) |
| 5655 request->callbacks->didOpenFileSystem(name, root_path); | 5658 request->callbacks->didOpenFileSystem(name, root_path); |
| 5656 else | 5659 else |
| 5657 request->callbacks->didFail(WebKit::WebFileErrorSecurity); | 5660 request->callbacks->didFail(WebKit::WebFileErrorSecurity); |
| 5658 request->callbacks = NULL; | 5661 request->callbacks = NULL; |
| 5659 pending_file_system_requests_.Remove(request_id); | 5662 pending_file_system_requests_.Remove(request_id); |
| 5660 } | 5663 } |
| OLD | NEW |