OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #include "chrome/renderer/renderer_webkitclient_impl.h" | 5 #include "chrome/renderer/renderer_webkitclient_impl.h" |
6 | 6 |
7 #if defined(USE_SYSTEM_SQLITE) | 7 #if defined(USE_SYSTEM_SQLITE) |
8 #include <sqlite3.h> | 8 #include <sqlite3.h> |
9 #else | 9 #else |
10 #include "third_party/sqlite/preprocessed/sqlite3.h" | 10 #include "third_party/sqlite/preprocessed/sqlite3.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/renderer/net/render_dns_master.h" | 22 #include "chrome/renderer/net/render_dns_master.h" |
23 #include "chrome/renderer/render_thread.h" | 23 #include "chrome/renderer/render_thread.h" |
24 #include "chrome/renderer/renderer_webstoragenamespace_impl.h" | 24 #include "chrome/renderer/renderer_webstoragenamespace_impl.h" |
25 #include "chrome/renderer/visitedlink_slave.h" | 25 #include "chrome/renderer/visitedlink_slave.h" |
26 #include "webkit/api/public/WebString.h" | 26 #include "webkit/api/public/WebString.h" |
27 #include "webkit/api/public/WebURL.h" | 27 #include "webkit/api/public/WebURL.h" |
28 #include "webkit/appcache/web_application_cache_host_impl.h" | 28 #include "webkit/appcache/web_application_cache_host_impl.h" |
29 #include "webkit/glue/glue_util.h" | 29 #include "webkit/glue/glue_util.h" |
30 #include "webkit/glue/webkit_glue.h" | 30 #include "webkit/glue/webkit_glue.h" |
31 | 31 |
32 #if defined(OS_LINUX) | 32 #if defined(USE_X11) |
33 #include "chrome/renderer/renderer_sandbox_support_linux.h" | 33 #include "chrome/renderer/renderer_sandbox_support_linux.h" |
34 #endif | 34 #endif |
35 | 35 |
36 #if defined(OS_POSIX) | 36 #if defined(OS_POSIX) |
37 #include "base/file_descriptor_posix.h" | 37 #include "base/file_descriptor_posix.h" |
38 #endif | 38 #endif |
39 | 39 |
40 using WebKit::WebApplicationCacheHost; | 40 using WebKit::WebApplicationCacheHost; |
41 using WebKit::WebApplicationCacheHostClient; | 41 using WebKit::WebApplicationCacheHostClient; |
42 using WebKit::WebStorageArea; | 42 using WebKit::WebStorageArea; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 //------------------------------------------------------------------------------ | 205 //------------------------------------------------------------------------------ |
206 | 206 |
207 #if defined(OS_WIN) | 207 #if defined(OS_WIN) |
208 | 208 |
209 bool RendererWebKitClientImpl::SandboxSupport::ensureFontLoaded(HFONT font) { | 209 bool RendererWebKitClientImpl::SandboxSupport::ensureFontLoaded(HFONT font) { |
210 LOGFONT logfont; | 210 LOGFONT logfont; |
211 GetObject(font, sizeof(LOGFONT), &logfont); | 211 GetObject(font, sizeof(LOGFONT), &logfont); |
212 return RenderThread::current()->Send(new ViewHostMsg_LoadFont(logfont)); | 212 return RenderThread::current()->Send(new ViewHostMsg_LoadFont(logfont)); |
213 } | 213 } |
214 | 214 |
215 #elif defined(OS_LINUX) | 215 #elif defined(USE_X11) |
216 | 216 |
217 WebString RendererWebKitClientImpl::SandboxSupport::getFontFamilyForCharacters( | 217 WebString RendererWebKitClientImpl::SandboxSupport::getFontFamilyForCharacters( |
218 const WebKit::WebUChar* characters, size_t num_characters) { | 218 const WebKit::WebUChar* characters, size_t num_characters) { |
219 AutoLock lock(unicode_font_families_mutex_); | 219 AutoLock lock(unicode_font_families_mutex_); |
220 const std::string key(reinterpret_cast<const char*>(characters), | 220 const std::string key(reinterpret_cast<const char*>(characters), |
221 num_characters * sizeof(characters[0])); | 221 num_characters * sizeof(characters[0])); |
222 const std::map<std::string, std::string>::const_iterator iter = | 222 const std::map<std::string, std::string>::const_iterator iter = |
223 unicode_font_families_.find(key); | 223 unicode_font_families_.find(key); |
224 if (iter != unicode_font_families_.end()) | 224 if (iter != unicode_font_families_.end()) |
225 return WebString::fromUTF8(iter->second); | 225 return WebString::fromUTF8(iter->second); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 long long RendererWebKitClientImpl::databaseGetFileSize( | 294 long long RendererWebKitClientImpl::databaseGetFileSize( |
295 const WebString& file_name) { | 295 const WebString& file_name) { |
296 DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance(); | 296 DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance(); |
297 int message_id = db_message_filter->GetUniqueID(); | 297 int message_id = db_message_filter->GetUniqueID(); |
298 return db_message_filter->SendAndWait( | 298 return db_message_filter->SendAndWait( |
299 new ViewHostMsg_DatabaseGetFileSize( | 299 new ViewHostMsg_DatabaseGetFileSize( |
300 FilePath(webkit_glue::WebStringToFilePathString(file_name)), | 300 FilePath(webkit_glue::WebStringToFilePathString(file_name)), |
301 message_id), | 301 message_id), |
302 message_id, 0LL); | 302 message_id, 0LL); |
303 } | 303 } |
OLD | NEW |