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/ppapi_plugin/ppapi_webkitplatformsupport_impl.h" | 5 #include "content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "content/common/child_process_messages.h" | 13 #include "content/common/child_process_messages.h" |
14 #include "content/common/child_thread.h" | 14 #include "content/common/child_thread.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize
dScriptValue.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize
dScriptValue.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
17 | 17 |
18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/win/WebSandb
oxSupport.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/win/WebSandb
oxSupport.h" |
20 #elif defined(OS_MACOSX) | 20 #elif defined(OS_MACOSX) |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/mac/WebSandb
oxSupport.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/mac/WebSandb
oxSupport.h" |
22 #elif defined(OS_POSIX) | 22 #elif defined(OS_POSIX) |
| 23 #if !defined(OS_ANDROID) |
23 #include "content/common/child_process_sandbox_support_impl_linux.h" | 24 #include "content/common/child_process_sandbox_support_impl_linux.h" |
| 25 #endif |
24 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/linux/WebFon
tFamily.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/linux/WebFon
tFamily.h" |
25 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/linux/WebSan
dboxSupport.h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/linux/WebSan
dboxSupport.h" |
| 28 |
26 #endif | 29 #endif |
27 | 30 |
28 using WebKit::WebSandboxSupport; | 31 using WebKit::WebSandboxSupport; |
29 using WebKit::WebString; | 32 using WebKit::WebString; |
30 using WebKit::WebUChar; | 33 using WebKit::WebUChar; |
31 | 34 |
32 typedef struct CGFont* CGFontRef; | 35 typedef struct CGFont* CGFontRef; |
33 | 36 |
34 class PpapiWebKitPlatformSupportImpl::SandboxSupport : public WebSandboxSupport
{ | 37 class PpapiWebKitPlatformSupportImpl::SandboxSupport : public WebSandboxSupport
{ |
35 public: | 38 public: |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 bool PpapiWebKitPlatformSupportImpl::SandboxSupport::loadFont( | 78 bool PpapiWebKitPlatformSupportImpl::SandboxSupport::loadFont( |
76 NSFont* src_font, | 79 NSFont* src_font, |
77 CGFontRef* out, | 80 CGFontRef* out, |
78 uint32_t* font_id) { | 81 uint32_t* font_id) { |
79 // TODO(brettw) this should do the something similar to what | 82 // TODO(brettw) this should do the something similar to what |
80 // RendererWebKitClientImpl does and request that the browser load the font. | 83 // RendererWebKitClientImpl does and request that the browser load the font. |
81 NOTIMPLEMENTED(); | 84 NOTIMPLEMENTED(); |
82 return false; | 85 return false; |
83 } | 86 } |
84 | 87 |
| 88 #elif defined(OS_ANDROID) |
| 89 |
| 90 // TODO(jrg): resolve (and implement?) PPAPI SandboxSupport for Android. |
| 91 |
| 92 void |
| 93 PpapiWebKitPlatformSupportImpl::SandboxSupport::getFontFamilyForCharacters( |
| 94 const WebUChar* characters, |
| 95 size_t num_characters, |
| 96 const char* preferred_locale, |
| 97 WebKit::WebFontFamily* family) { |
| 98 NOTIMPLEMENTED(); |
| 99 } |
| 100 |
| 101 void PpapiWebKitPlatformSupportImpl::SandboxSupport::getRenderStyleForStrike( |
| 102 const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out) { |
| 103 NOTIMPLEMENTED(); |
| 104 } |
| 105 |
85 #elif defined(OS_POSIX) | 106 #elif defined(OS_POSIX) |
86 | 107 |
87 void | 108 void |
88 PpapiWebKitPlatformSupportImpl::SandboxSupport::getFontFamilyForCharacters( | 109 PpapiWebKitPlatformSupportImpl::SandboxSupport::getFontFamilyForCharacters( |
89 const WebUChar* characters, | 110 const WebUChar* characters, |
90 size_t num_characters, | 111 size_t num_characters, |
91 const char* preferred_locale, | 112 const char* preferred_locale, |
92 WebKit::WebFontFamily* family) { | 113 WebKit::WebFontFamily* family) { |
93 base::AutoLock lock(unicode_font_families_mutex_); | 114 base::AutoLock lock(unicode_font_families_mutex_); |
94 const string16 key(characters, num_characters); | 115 const string16 key(characters, num_characters); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } | 268 } |
248 | 269 |
249 WebKit::WebSerializedScriptValue | 270 WebKit::WebSerializedScriptValue |
250 PpapiWebKitPlatformSupportImpl::injectIDBKeyIntoSerializedValue( | 271 PpapiWebKitPlatformSupportImpl::injectIDBKeyIntoSerializedValue( |
251 const WebKit::WebIDBKey& key, | 272 const WebKit::WebIDBKey& key, |
252 const WebKit::WebSerializedScriptValue& value, | 273 const WebKit::WebSerializedScriptValue& value, |
253 const WebKit::WebIDBKeyPath& keyPath) { | 274 const WebKit::WebIDBKeyPath& keyPath) { |
254 NOTREACHED(); | 275 NOTREACHED(); |
255 return WebKit::WebSerializedScriptValue(); | 276 return WebKit::WebSerializedScriptValue(); |
256 } | 277 } |
OLD | NEW |