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/renderer_webkitclient_impl.h" | 5 #include "chrome/renderer/renderer_webkitclient_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 #include "chrome/common/database_util.h" | 13 #include "chrome/common/database_util.h" |
14 #include "chrome/common/file_system/webfilesystem_impl.h" | 14 #include "chrome/common/file_system/webfilesystem_impl.h" |
15 #include "chrome/common/file_utilities_messages.h" | 15 #include "chrome/common/file_utilities_messages.h" |
16 #include "chrome/common/mime_registry_messages.h" | 16 #include "chrome/common/mime_registry_messages.h" |
17 #include "chrome/common/render_messages.h" | 17 #include "chrome/common/render_messages.h" |
18 #include "chrome/common/webblobregistry_impl.h" | 18 #include "chrome/common/webblobregistry_impl.h" |
19 #include "chrome/common/webmessageportchannel_impl.h" | 19 #include "chrome/common/webmessageportchannel_impl.h" |
20 #include "chrome/plugin/npobject_util.h" | 20 #include "chrome/plugin/npobject_util.h" |
21 #include "chrome/renderer/net/renderer_net_predictor.h" | 21 #include "chrome/renderer/net/renderer_net_predictor.h" |
22 #include "chrome/renderer/render_thread.h" | 22 #include "chrome/renderer/render_thread.h" |
23 #include "chrome/renderer/render_view.h" | 23 #include "chrome/renderer/render_view.h" |
| 24 #include "chrome/renderer/renderer_webaudiodevice_impl.h" |
24 #include "chrome/renderer/renderer_webidbfactory_impl.h" | 25 #include "chrome/renderer/renderer_webidbfactory_impl.h" |
25 #include "chrome/renderer/renderer_webstoragenamespace_impl.h" | 26 #include "chrome/renderer/renderer_webstoragenamespace_impl.h" |
26 #include "chrome/renderer/visitedlink_slave.h" | 27 #include "chrome/renderer/visitedlink_slave.h" |
27 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h" | 28 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h" |
28 #include "chrome/renderer/websharedworkerrepository_impl.h" | 29 #include "chrome/renderer/websharedworkerrepository_impl.h" |
29 #include "googleurl/src/gurl.h" | 30 #include "googleurl/src/gurl.h" |
30 #include "ipc/ipc_sync_message_filter.h" | 31 #include "ipc/ipc_sync_message_filter.h" |
31 #include "third_party/WebKit/WebKit/chromium/public/WebBlobRegistry.h" | 32 #include "third_party/WebKit/WebKit/chromium/public/WebBlobRegistry.h" |
32 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 33 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
33 #include "third_party/WebKit/WebKit/chromium/public/WebGraphicsContext3D.h" | 34 #include "third_party/WebKit/WebKit/chromium/public/WebGraphicsContext3D.h" |
(...skipping 25 matching lines...) Expand all Loading... |
59 | 60 |
60 #include "base/lock.h" | 61 #include "base/lock.h" |
61 #include "chrome/renderer/renderer_sandbox_support_linux.h" | 62 #include "chrome/renderer/renderer_sandbox_support_linux.h" |
62 #include "third_party/WebKit/WebKit/chromium/public/linux/WebSandboxSupport.h" | 63 #include "third_party/WebKit/WebKit/chromium/public/linux/WebSandboxSupport.h" |
63 #endif | 64 #endif |
64 | 65 |
65 #if defined(OS_POSIX) | 66 #if defined(OS_POSIX) |
66 #include "base/file_descriptor_posix.h" | 67 #include "base/file_descriptor_posix.h" |
67 #endif | 68 #endif |
68 | 69 |
| 70 using WebKit::WebAudioDevice; |
69 using WebKit::WebBlobRegistry; | 71 using WebKit::WebBlobRegistry; |
70 using WebKit::WebFileSystem; | 72 using WebKit::WebFileSystem; |
71 using WebKit::WebFrame; | 73 using WebKit::WebFrame; |
72 using WebKit::WebIDBFactory; | 74 using WebKit::WebIDBFactory; |
73 using WebKit::WebIDBKey; | 75 using WebKit::WebIDBKey; |
74 using WebKit::WebIDBKeyPath; | 76 using WebKit::WebIDBKeyPath; |
75 using WebKit::WebKitClient; | 77 using WebKit::WebKitClient; |
76 using WebKit::WebSerializedScriptValue; | 78 using WebKit::WebSerializedScriptValue; |
77 using WebKit::WebStorageArea; | 79 using WebKit::WebStorageArea; |
78 using WebKit::WebStorageEventDispatcher; | 80 using WebKit::WebStorageEventDispatcher; |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 return WebKit::WebGraphicsContext3D::createDefault(); | 513 return WebKit::WebGraphicsContext3D::createDefault(); |
512 } else { | 514 } else { |
513 #if defined(ENABLE_GPU) | 515 #if defined(ENABLE_GPU) |
514 return new WebGraphicsContext3DCommandBufferImpl(); | 516 return new WebGraphicsContext3DCommandBufferImpl(); |
515 #else | 517 #else |
516 return NULL; | 518 return NULL; |
517 #endif | 519 #endif |
518 } | 520 } |
519 } | 521 } |
520 | 522 |
| 523 WebAudioDevice* |
| 524 RendererWebKitClientImpl::createAudioDevice( |
| 525 size_t buffer_size, |
| 526 unsigned channels, |
| 527 double sample_rate, |
| 528 WebAudioDevice::RenderCallback* callback) { |
| 529 return new RendererWebAudioDeviceImpl(buffer_size, |
| 530 channels, |
| 531 sample_rate, |
| 532 callback); |
| 533 } |
| 534 |
521 //------------------------------------------------------------------------------ | 535 //------------------------------------------------------------------------------ |
522 | 536 |
523 WebKit::WebString RendererWebKitClientImpl::signedPublicKeyAndChallengeString( | 537 WebKit::WebString RendererWebKitClientImpl::signedPublicKeyAndChallengeString( |
524 unsigned key_size_index, | 538 unsigned key_size_index, |
525 const WebKit::WebString& challenge, | 539 const WebKit::WebString& challenge, |
526 const WebKit::WebURL& url) { | 540 const WebKit::WebURL& url) { |
527 std::string signed_public_key; | 541 std::string signed_public_key; |
528 RenderThread::current()->Send(new ViewHostMsg_Keygen( | 542 RenderThread::current()->Send(new ViewHostMsg_Keygen( |
529 static_cast<uint32>(key_size_index), | 543 static_cast<uint32>(key_size_index), |
530 challenge.utf8(), | 544 challenge.utf8(), |
531 GURL(url), | 545 GURL(url), |
532 &signed_public_key)); | 546 &signed_public_key)); |
533 return WebString::fromUTF8(signed_public_key); | 547 return WebString::fromUTF8(signed_public_key); |
534 } | 548 } |
535 | 549 |
536 //------------------------------------------------------------------------------ | 550 //------------------------------------------------------------------------------ |
537 | 551 |
538 WebBlobRegistry* RendererWebKitClientImpl::blobRegistry() { | 552 WebBlobRegistry* RendererWebKitClientImpl::blobRegistry() { |
539 if (!blob_registry_.get()) | 553 if (!blob_registry_.get()) |
540 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); | 554 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); |
541 return blob_registry_.get(); | 555 return blob_registry_.get(); |
542 } | 556 } |
OLD | NEW |