| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // The value is a string containing the correct font family. | 120 // The value is a string containing the correct font family. |
| 121 Lock unicode_font_families_mutex_; | 121 Lock unicode_font_families_mutex_; |
| 122 std::map<std::string, std::string> unicode_font_families_; | 122 std::map<std::string, std::string> unicode_font_families_; |
| 123 #endif | 123 #endif |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 //------------------------------------------------------------------------------ | 126 //------------------------------------------------------------------------------ |
| 127 | 127 |
| 128 RendererWebKitClientImpl::RendererWebKitClientImpl() | 128 RendererWebKitClientImpl::RendererWebKitClientImpl() |
| 129 : clipboard_(new webkit_glue::WebClipboardImpl), | 129 : clipboard_(new webkit_glue::WebClipboardImpl), |
| 130 file_utilities_(new RendererWebKitClientImpl::FileUtilities), | |
| 131 mime_registry_(new RendererWebKitClientImpl::MimeRegistry), | 130 mime_registry_(new RendererWebKitClientImpl::MimeRegistry), |
| 132 sandbox_support_(new RendererWebKitClientImpl::SandboxSupport), | 131 sandbox_support_(new RendererWebKitClientImpl::SandboxSupport), |
| 133 sudden_termination_disables_(0), | 132 sudden_termination_disables_(0), |
| 134 shared_worker_repository_(new WebSharedWorkerRepositoryImpl) { | 133 shared_worker_repository_(new WebSharedWorkerRepositoryImpl) { |
| 135 file_utilities_->set_sandbox_enabled(sandboxEnabled()); | |
| 136 } | 134 } |
| 137 | 135 |
| 138 RendererWebKitClientImpl::~RendererWebKitClientImpl() { | 136 RendererWebKitClientImpl::~RendererWebKitClientImpl() { |
| 139 } | 137 } |
| 140 | 138 |
| 141 //------------------------------------------------------------------------------ | 139 //------------------------------------------------------------------------------ |
| 142 | 140 |
| 143 WebKit::WebClipboard* RendererWebKitClientImpl::clipboard() { | 141 WebKit::WebClipboard* RendererWebKitClientImpl::clipboard() { |
| 144 return clipboard_.get(); | 142 return clipboard_.get(); |
| 145 } | 143 } |
| 146 | 144 |
| 147 WebKit::WebMimeRegistry* RendererWebKitClientImpl::mimeRegistry() { | 145 WebKit::WebMimeRegistry* RendererWebKitClientImpl::mimeRegistry() { |
| 148 return mime_registry_.get(); | 146 return mime_registry_.get(); |
| 149 } | 147 } |
| 150 | 148 |
| 151 WebKit::WebFileUtilities* RendererWebKitClientImpl::fileUtilities() { | 149 WebKit::WebFileUtilities* RendererWebKitClientImpl::fileUtilities() { |
| 150 if (!file_utilities_.get()) { |
| 151 file_utilities_.reset(new FileUtilities); |
| 152 file_utilities_->set_sandbox_enabled(sandboxEnabled()); |
| 153 } |
| 152 return file_utilities_.get(); | 154 return file_utilities_.get(); |
| 153 } | 155 } |
| 154 | 156 |
| 155 WebKit::WebSandboxSupport* RendererWebKitClientImpl::sandboxSupport() { | 157 WebKit::WebSandboxSupport* RendererWebKitClientImpl::sandboxSupport() { |
| 156 return sandbox_support_.get(); | 158 return sandbox_support_.get(); |
| 157 } | 159 } |
| 158 | 160 |
| 159 WebKit::WebCookieJar* RendererWebKitClientImpl::cookieJar() { | 161 WebKit::WebCookieJar* RendererWebKitClientImpl::cookieJar() { |
| 160 NOTREACHED() << "Use WebFrameClient::cookieJar() instead!"; | 162 NOTREACHED() << "Use WebFrameClient::cookieJar() instead!"; |
| 161 return NULL; | 163 return NULL; |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 return WebString::fromUTF8(signed_public_key); | 521 return WebString::fromUTF8(signed_public_key); |
| 520 } | 522 } |
| 521 | 523 |
| 522 //------------------------------------------------------------------------------ | 524 //------------------------------------------------------------------------------ |
| 523 | 525 |
| 524 WebBlobRegistry* RendererWebKitClientImpl::blobRegistry() { | 526 WebBlobRegistry* RendererWebKitClientImpl::blobRegistry() { |
| 525 if (!blob_registry_.get()) | 527 if (!blob_registry_.get()) |
| 526 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); | 528 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); |
| 527 return blob_registry_.get(); | 529 return blob_registry_.get(); |
| 528 } | 530 } |
| OLD | NEW |