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" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // being different in single-process mode. | 174 // being different in single-process mode. |
175 return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); | 175 return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); |
176 } | 176 } |
177 | 177 |
178 bool RendererWebKitClientImpl::SendSyncMessageFromAnyThread( | 178 bool RendererWebKitClientImpl::SendSyncMessageFromAnyThread( |
179 IPC::SyncMessage* msg) { | 179 IPC::SyncMessage* msg) { |
180 RenderThread* render_thread = RenderThread::current(); | 180 RenderThread* render_thread = RenderThread::current(); |
181 if (render_thread) | 181 if (render_thread) |
182 return render_thread->Send(msg); | 182 return render_thread->Send(msg); |
183 | 183 |
184 scoped_refptr<IPC::SyncMessageFilter> sync_msg_filter = | 184 scoped_refptr<IPC::SyncMessageFilter> sync_msg_filter( |
185 ChildThread::current()->sync_message_filter(); | 185 ChildThread::current()->sync_message_filter()); |
186 return sync_msg_filter->Send(msg); | 186 return sync_msg_filter->Send(msg); |
187 } | 187 } |
188 | 188 |
189 unsigned long long RendererWebKitClientImpl::visitedLinkHash( | 189 unsigned long long RendererWebKitClientImpl::visitedLinkHash( |
190 const char* canonical_url, | 190 const char* canonical_url, |
191 size_t length) { | 191 size_t length) { |
192 return RenderThread::current()->visited_link_slave()->ComputeURLFingerprint( | 192 return RenderThread::current()->visited_link_slave()->ComputeURLFingerprint( |
193 canonical_url, length); | 193 canonical_url, length); |
194 } | 194 } |
195 | 195 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 return WebString::fromUTF8(signed_public_key); | 529 return WebString::fromUTF8(signed_public_key); |
530 } | 530 } |
531 | 531 |
532 //------------------------------------------------------------------------------ | 532 //------------------------------------------------------------------------------ |
533 | 533 |
534 WebBlobRegistry* RendererWebKitClientImpl::blobRegistry() { | 534 WebBlobRegistry* RendererWebKitClientImpl::blobRegistry() { |
535 if (!blob_registry_.get()) | 535 if (!blob_registry_.get()) |
536 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); | 536 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); |
537 return blob_registry_.get(); | 537 return blob_registry_.get(); |
538 } | 538 } |
OLD | NEW |