Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc

Issue 11231016: Move content's a plugin, ppapi_plugin, utility, and worker subdirectories to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 16 matching lines...) Expand all
27 #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 28
29 #endif 29 #endif
30 30
31 using WebKit::WebSandboxSupport; 31 using WebKit::WebSandboxSupport;
32 using WebKit::WebString; 32 using WebKit::WebString;
33 using WebKit::WebUChar; 33 using WebKit::WebUChar;
34 34
35 typedef struct CGFont* CGFontRef; 35 typedef struct CGFont* CGFontRef;
36 36
37 namespace content {
38
37 class PpapiWebKitPlatformSupportImpl::SandboxSupport : public WebSandboxSupport { 39 class PpapiWebKitPlatformSupportImpl::SandboxSupport : public WebSandboxSupport {
38 public: 40 public:
39 virtual ~SandboxSupport() {} 41 virtual ~SandboxSupport() {}
40 42
41 #if defined(OS_WIN) 43 #if defined(OS_WIN)
42 virtual bool ensureFontLoaded(HFONT); 44 virtual bool ensureFontLoaded(HFONT);
43 #elif defined(OS_MACOSX) 45 #elif defined(OS_MACOSX)
44 virtual bool loadFont( 46 virtual bool loadFont(
45 NSFont* srcFont, CGFontRef* out, uint32_t* fontID); 47 NSFont* srcFont, CGFontRef* out, uint32_t* fontID);
46 #elif defined(OS_POSIX) 48 #elif defined(OS_POSIX)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const string16 key(characters, num_characters); 117 const string16 key(characters, num_characters);
116 const std::map<string16, WebKit::WebFontFamily>::const_iterator iter = 118 const std::map<string16, WebKit::WebFontFamily>::const_iterator iter =
117 unicode_font_families_.find(key); 119 unicode_font_families_.find(key);
118 if (iter != unicode_font_families_.end()) { 120 if (iter != unicode_font_families_.end()) {
119 family->name = iter->second.name; 121 family->name = iter->second.name;
120 family->isBold = iter->second.isBold; 122 family->isBold = iter->second.isBold;
121 family->isItalic = iter->second.isItalic; 123 family->isItalic = iter->second.isItalic;
122 return; 124 return;
123 } 125 }
124 126
125 content::GetFontFamilyForCharacters( 127 GetFontFamilyForCharacters(
126 characters, 128 characters,
127 num_characters, 129 num_characters,
128 preferred_locale, 130 preferred_locale,
129 family); 131 family);
130 unicode_font_families_.insert(make_pair(key, *family)); 132 unicode_font_families_.insert(make_pair(key, *family));
131 } 133 }
132 134
133 void PpapiWebKitPlatformSupportImpl::SandboxSupport::getRenderStyleForStrike( 135 void PpapiWebKitPlatformSupportImpl::SandboxSupport::getRenderStyleForStrike(
134 const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out) { 136 const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out) {
135 content::GetRenderStyleForStrike(family, sizeAndStyle, out); 137 GetRenderStyleForStrike(family, sizeAndStyle, out);
136 } 138 }
137 139
138 #endif 140 #endif
139 141
140 PpapiWebKitPlatformSupportImpl::PpapiWebKitPlatformSupportImpl() 142 PpapiWebKitPlatformSupportImpl::PpapiWebKitPlatformSupportImpl()
141 : sandbox_support_(new PpapiWebKitPlatformSupportImpl::SandboxSupport()) { 143 : sandbox_support_(new PpapiWebKitPlatformSupportImpl::SandboxSupport()) {
142 } 144 }
143 145
144 PpapiWebKitPlatformSupportImpl::~PpapiWebKitPlatformSupportImpl() { 146 PpapiWebKitPlatformSupportImpl::~PpapiWebKitPlatformSupportImpl() {
145 } 147 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 PpapiWebKitPlatformSupportImpl::sharedWorkerRepository() { 254 PpapiWebKitPlatformSupportImpl::sharedWorkerRepository() {
253 NOTREACHED(); 255 NOTREACHED();
254 return NULL; 256 return NULL;
255 } 257 }
256 258
257 int PpapiWebKitPlatformSupportImpl::databaseDeleteFile( 259 int PpapiWebKitPlatformSupportImpl::databaseDeleteFile(
258 const WebKit::WebString& vfs_file_name, bool sync_dir) { 260 const WebKit::WebString& vfs_file_name, bool sync_dir) {
259 NOTREACHED(); 261 NOTREACHED();
260 return 0; 262 return 0;
261 } 263 }
264
265 } // namespace content
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h ('k') | content/utility/utility_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698