OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_webkitclient_impl.h" | 5 #include "content/ppapi_plugin/ppapi_webkitclient_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" |
(...skipping 15 matching lines...) Expand all Loading... |
26 using WebKit::WebString; | 26 using WebKit::WebString; |
27 using WebKit::WebUChar; | 27 using WebKit::WebUChar; |
28 | 28 |
29 class PpapiWebKitClientImpl::SandboxSupport : public WebSandboxSupport { | 29 class PpapiWebKitClientImpl::SandboxSupport : public WebSandboxSupport { |
30 public: | 30 public: |
31 virtual ~SandboxSupport() {} | 31 virtual ~SandboxSupport() {} |
32 | 32 |
33 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
34 virtual bool ensureFontLoaded(HFONT); | 34 virtual bool ensureFontLoaded(HFONT); |
35 #elif defined(OS_MACOSX) | 35 #elif defined(OS_MACOSX) |
36 // TODO(jeremy): Remove once WebKit side of patch lands - crbug.com/72727 . | |
37 virtual bool loadFont(NSFont* srcFont, ATSFontContainerRef* out); | |
38 virtual bool loadFont( | 36 virtual bool loadFont( |
39 NSFont* srcFont, ATSFontContainerRef* out, uint32_t* fontID); | 37 NSFont* srcFont, ATSFontContainerRef* out, uint32_t* fontID); |
40 #elif defined(OS_POSIX) | 38 #elif defined(OS_POSIX) |
41 virtual WebString getFontFamilyForCharacters( | 39 virtual WebString getFontFamilyForCharacters( |
42 const WebUChar* characters, | 40 const WebUChar* characters, |
43 size_t numCharacters, | 41 size_t numCharacters, |
44 const char* preferred_locale); | 42 const char* preferred_locale); |
45 virtual void getRenderStyleForStrike( | 43 virtual void getRenderStyleForStrike( |
46 const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out); | 44 const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out); |
47 | 45 |
(...skipping 11 matching lines...) Expand all Loading... |
59 | 57 |
60 bool PpapiWebKitClientImpl::SandboxSupport::ensureFontLoaded(HFONT font) { | 58 bool PpapiWebKitClientImpl::SandboxSupport::ensureFontLoaded(HFONT font) { |
61 // TODO(brettw) this should do the something similar to what | 59 // TODO(brettw) this should do the something similar to what |
62 // RendererWebKitClientImpl does and request that the browser load the font. | 60 // RendererWebKitClientImpl does and request that the browser load the font. |
63 NOTIMPLEMENTED(); | 61 NOTIMPLEMENTED(); |
64 return false; | 62 return false; |
65 } | 63 } |
66 | 64 |
67 #elif defined(OS_MACOSX) | 65 #elif defined(OS_MACOSX) |
68 | 66 |
69 // TODO(jeremy): Remove once WebKit side of patch lands - crbug.com/72727 . | |
70 bool PpapiWebKitClientImpl::SandboxSupport::loadFont(NSFont* srcFont, | |
71 ATSFontContainerRef* out) { | |
72 // TODO(brettw) this should do the something similar to what | |
73 // RendererWebKitClientImpl does and request that the browser load the font. | |
74 NOTIMPLEMENTED(); | |
75 return false; | |
76 } | |
77 | |
78 bool PpapiWebKitClientImpl::SandboxSupport::loadFont(NSFont* srcFont, | 67 bool PpapiWebKitClientImpl::SandboxSupport::loadFont(NSFont* srcFont, |
79 ATSFontContainerRef* out, uint32_t* fontID) { | 68 ATSFontContainerRef* out, uint32_t* fontID) { |
80 // TODO(brettw) this should do the something similar to what | 69 // TODO(brettw) this should do the something similar to what |
81 // RendererWebKitClientImpl does and request that the browser load the font. | 70 // RendererWebKitClientImpl does and request that the browser load the font. |
82 NOTIMPLEMENTED(); | 71 NOTIMPLEMENTED(); |
83 return false; | 72 return false; |
84 } | 73 } |
85 | 74 |
86 #elif defined(OS_POSIX) | 75 #elif defined(OS_POSIX) |
87 | 76 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 } | 233 } |
245 | 234 |
246 WebKit::WebSerializedScriptValue | 235 WebKit::WebSerializedScriptValue |
247 PpapiWebKitClientImpl::injectIDBKeyIntoSerializedValue( | 236 PpapiWebKitClientImpl::injectIDBKeyIntoSerializedValue( |
248 const WebKit::WebIDBKey& key, | 237 const WebKit::WebIDBKey& key, |
249 const WebKit::WebSerializedScriptValue& value, | 238 const WebKit::WebSerializedScriptValue& value, |
250 const WebKit::WebString& keyPath) { | 239 const WebKit::WebString& keyPath) { |
251 NOTREACHED(); | 240 NOTREACHED(); |
252 return WebKit::WebSerializedScriptValue(); | 241 return WebKit::WebSerializedScriptValue(); |
253 } | 242 } |
OLD | NEW |