OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/renderer_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "content/common/database_util.h" | 13 #include "content/common/database_util.h" |
14 #include "content/common/file_system/webfilesystem_impl.h" | 14 #include "content/common/file_system/webfilesystem_impl.h" |
15 #include "content/common/file_utilities_messages.h" | 15 #include "content/common/file_utilities_messages.h" |
16 #include "content/common/mime_registry_messages.h" | 16 #include "content/common/mime_registry_messages.h" |
17 #include "content/common/npobject_util.h" | 17 #include "content/common/npobject_util.h" |
18 #include "content/common/view_messages.h" | 18 #include "content/common/view_messages.h" |
19 #include "content/common/webblobregistry_impl.h" | 19 #include "content/common/webblobregistry_impl.h" |
20 #include "content/common/webmessageportchannel_impl.h" | 20 #include "content/common/webmessageportchannel_impl.h" |
21 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
22 #include "content/public/renderer/content_renderer_client.h" | 22 #include "content/public/renderer/content_renderer_client.h" |
23 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" | 23 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" |
24 #include "content/renderer/media/audio_device.h" | 24 #include "content/renderer/media/audio_device.h" |
25 #include "content/renderer/media/audio_hardware.h" | 25 #include "content/renderer/media/audio_hardware.h" |
26 #include "content/renderer/render_thread_impl.h" | 26 #include "content/renderer/render_thread_impl.h" |
| 27 #include "content/renderer/renderer_clipboard_client.h" |
27 #include "content/renderer/renderer_webaudiodevice_impl.h" | 28 #include "content/renderer/renderer_webaudiodevice_impl.h" |
28 #include "content/renderer/renderer_webidbfactory_impl.h" | 29 #include "content/renderer/renderer_webidbfactory_impl.h" |
29 #include "content/renderer/renderer_webstoragenamespace_impl.h" | 30 #include "content/renderer/renderer_webstoragenamespace_impl.h" |
30 #include "content/renderer/websharedworkerrepository_impl.h" | 31 #include "content/renderer/websharedworkerrepository_impl.h" |
31 #include "googleurl/src/gurl.h" | 32 #include "googleurl/src/gurl.h" |
32 #include "ipc/ipc_sync_message_filter.h" | 33 #include "ipc/ipc_sync_message_filter.h" |
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobRegistry.h" | 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobRegistry.h" |
34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D.
h" | 36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D.
h" |
36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" | 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // here. The key in this map is an array of 16-bit UTF16 values from WebKit. | 135 // here. The key in this map is an array of 16-bit UTF16 values from WebKit. |
135 // The value is a string containing the correct font family. | 136 // The value is a string containing the correct font family. |
136 base::Lock unicode_font_families_mutex_; | 137 base::Lock unicode_font_families_mutex_; |
137 std::map<string16, std::string> unicode_font_families_; | 138 std::map<string16, std::string> unicode_font_families_; |
138 #endif | 139 #endif |
139 }; | 140 }; |
140 | 141 |
141 //------------------------------------------------------------------------------ | 142 //------------------------------------------------------------------------------ |
142 | 143 |
143 RendererWebKitPlatformSupportImpl::RendererWebKitPlatformSupportImpl() | 144 RendererWebKitPlatformSupportImpl::RendererWebKitPlatformSupportImpl() |
144 : clipboard_(new webkit_glue::WebClipboardImpl), | 145 : clipboard_client_(new RendererClipboardClient), |
| 146 clipboard_(new webkit_glue::WebClipboardImpl(clipboard_client_.get())), |
145 mime_registry_(new RendererWebKitPlatformSupportImpl::MimeRegistry), | 147 mime_registry_(new RendererWebKitPlatformSupportImpl::MimeRegistry), |
146 sandbox_support_(new RendererWebKitPlatformSupportImpl::SandboxSupport), | 148 sandbox_support_(new RendererWebKitPlatformSupportImpl::SandboxSupport), |
147 sudden_termination_disables_(0), | 149 sudden_termination_disables_(0), |
148 shared_worker_repository_(new WebSharedWorkerRepositoryImpl) { | 150 shared_worker_repository_(new WebSharedWorkerRepositoryImpl) { |
149 } | 151 } |
150 | 152 |
151 RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl() { | 153 RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl() { |
152 } | 154 } |
153 | 155 |
154 //------------------------------------------------------------------------------ | 156 //------------------------------------------------------------------------------ |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 blob_registry_.reset(new WebBlobRegistryImpl(ChildThread::current())); | 610 blob_registry_.reset(new WebBlobRegistryImpl(ChildThread::current())); |
609 } | 611 } |
610 return blob_registry_.get(); | 612 return blob_registry_.get(); |
611 } | 613 } |
612 | 614 |
613 WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent( | 615 WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent( |
614 const WebKit::WebURL& url) { | 616 const WebKit::WebURL& url) { |
615 return WebKitPlatformSupportImpl::userAgent(url); | 617 return WebKitPlatformSupportImpl::userAgent(url); |
616 } | 618 } |
617 | 619 |
OLD | NEW |