OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 //------------------------------------------------------------------------------ | 158 //------------------------------------------------------------------------------ |
159 | 159 |
160 RendererWebKitPlatformSupportImpl::RendererWebKitPlatformSupportImpl() | 160 RendererWebKitPlatformSupportImpl::RendererWebKitPlatformSupportImpl() |
161 : clipboard_client_(new RendererClipboardClient), | 161 : clipboard_client_(new RendererClipboardClient), |
162 clipboard_(new webkit_glue::WebClipboardImpl(clipboard_client_.get())), | 162 clipboard_(new webkit_glue::WebClipboardImpl(clipboard_client_.get())), |
163 mime_registry_(new RendererWebKitPlatformSupportImpl::MimeRegistry), | 163 mime_registry_(new RendererWebKitPlatformSupportImpl::MimeRegistry), |
164 sudden_termination_disables_(0), | 164 sudden_termination_disables_(0), |
165 plugin_refresh_allowed_(true), | 165 plugin_refresh_allowed_(true), |
166 shared_worker_repository_(new WebSharedWorkerRepositoryImpl) { | 166 shared_worker_repository_(new WebSharedWorkerRepositoryImpl) { |
167 if (g_sandbox_enabled) { | 167 if (g_sandbox_enabled && sandboxEnabled()) { |
168 sandbox_support_.reset( | 168 sandbox_support_.reset( |
169 new RendererWebKitPlatformSupportImpl::SandboxSupport); | 169 new RendererWebKitPlatformSupportImpl::SandboxSupport); |
170 } else { | 170 } else { |
171 DVLOG(1) << "Disabling sandbox support for testing."; | 171 DVLOG(1) << "Disabling sandbox support for testing."; |
172 } | 172 } |
173 } | 173 } |
174 | 174 |
175 RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl() { | 175 RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl() { |
176 } | 176 } |
177 | 177 |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 const char16* characters, | 753 const char16* characters, |
754 size_t length, | 754 size_t length, |
755 size_t before_index, | 755 size_t before_index, |
756 const WebKit::WebString& locale) { | 756 const WebKit::WebString& locale) { |
757 // Crash if WebKit calls this function when canHyphenate returns false. | 757 // Crash if WebKit calls this function when canHyphenate returns false. |
758 DCHECK(locale.isEmpty() || locale.equals("en-US")); | 758 DCHECK(locale.isEmpty() || locale.equals("en-US")); |
759 DCHECK(hyphenator_.get()); | 759 DCHECK(hyphenator_.get()); |
760 return hyphenator_->ComputeLastHyphenLocation(string16(characters, length), | 760 return hyphenator_->ComputeLastHyphenLocation(string16(characters, length), |
761 before_index); | 761 before_index); |
762 } | 762 } |
OLD | NEW |