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_main_platform_delegate.h" | 5 #include "content/renderer/renderer_main_platform_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 if (render_thread) { | 31 if (render_thread) { |
32 render_thread->PreCacheFont(logfont); | 32 render_thread->PreCacheFont(logfont); |
33 } | 33 } |
34 } | 34 } |
35 | 35 |
36 void SkiaPreCacheFontCharacters(const LOGFONT& logfont, | 36 void SkiaPreCacheFontCharacters(const LOGFONT& logfont, |
37 const wchar_t* text, | 37 const wchar_t* text, |
38 unsigned int text_length) { | 38 unsigned int text_length) { |
39 RenderThreadImpl* render_thread_impl = RenderThreadImpl::current(); | 39 RenderThreadImpl* render_thread_impl = RenderThreadImpl::current(); |
40 if (render_thread_impl) { | 40 if (render_thread_impl) { |
41 render_thread_impl->PreCacheFontCharacters(logfont, | 41 render_thread_impl->PreCacheFontCharacters( |
42 string16(text, text_length)); | 42 logfont, |
| 43 base::string16(text, text_length)); |
43 } | 44 } |
44 } | 45 } |
45 | 46 |
46 #if !defined(NDEBUG) | 47 #if !defined(NDEBUG) |
47 LRESULT CALLBACK WindowsHookCBT(int code, WPARAM w_param, LPARAM l_param) { | 48 LRESULT CALLBACK WindowsHookCBT(int code, WPARAM w_param, LPARAM l_param) { |
48 CHECK_NE(code, HCBT_CREATEWND) | 49 CHECK_NE(code, HCBT_CREATEWND) |
49 << "Should not be creating windows in the renderer!"; | 50 << "Should not be creating windows in the renderer!"; |
50 return CallNextHookEx(NULL, code, w_param, l_param); | 51 return CallNextHookEx(NULL, code, w_param, l_param); |
51 } | 52 } |
52 #endif // !NDEBUG | 53 #endif // !NDEBUG |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 if (run_security_tests) { | 150 if (run_security_tests) { |
150 int test_count = 0; | 151 int test_count = 0; |
151 DVLOG(1) << "Running renderer security tests"; | 152 DVLOG(1) << "Running renderer security tests"; |
152 BOOL result = run_security_tests(&test_count); | 153 BOOL result = run_security_tests(&test_count); |
153 CHECK(result) << "Test number " << test_count << " has failed."; | 154 CHECK(result) << "Test number " << test_count << " has failed."; |
154 } | 155 } |
155 } | 156 } |
156 } | 157 } |
157 | 158 |
158 } // namespace content | 159 } // namespace content |
OLD | NEW |