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

Side by Side Diff: content/common/font_cache_dispatcher_win.cc

Issue 11235068: Move the remaning files in content\common to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « content/common/font_cache_dispatcher_win.h ('k') | content/common/font_config_ipc_linux.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/font_cache_dispatcher_win.h" 5 #include "content/common/font_cache_dispatcher_win.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include <map> 8 #include <map>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "content/common/child_process_messages.h" 12 #include "content/common/child_process_messages.h"
13 13
14 namespace content {
14 namespace { 15 namespace {
15 typedef std::vector<string16> FontNameVector; 16 typedef std::vector<string16> FontNameVector;
16 typedef std::map<FontCacheDispatcher*, FontNameVector> DispatcherToFontNames; 17 typedef std::map<FontCacheDispatcher*, FontNameVector> DispatcherToFontNames;
17 18
18 class FontCache { 19 class FontCache {
19 public: 20 public:
20 static FontCache* GetInstance() { 21 static FontCache* GetInstance() {
21 return Singleton<FontCache>::get(); 22 return Singleton<FontCache>::get();
22 } 23 }
23 24
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // when a font is asked to be cached, we always recreates the font object 183 // when a font is asked to be cached, we always recreates the font object
183 // to avoid the case that an in-cache font is swapped out by GDI. 184 // to avoid the case that an in-cache font is swapped out by GDI.
184 FontCache::GetInstance()->PreCacheFont(font, this); 185 FontCache::GetInstance()->PreCacheFont(font, this);
185 } 186 }
186 187
187 void FontCacheDispatcher::OnReleaseCachedFonts() { 188 void FontCacheDispatcher::OnReleaseCachedFonts() {
188 // Release cached fonts that requested from a pid by decrementing the ref 189 // Release cached fonts that requested from a pid by decrementing the ref
189 // count. When ref count is zero, the handles are released. 190 // count. When ref count is zero, the handles are released.
190 FontCache::GetInstance()->ReleaseCachedFonts(this); 191 FontCache::GetInstance()->ReleaseCachedFonts(this);
191 } 192 }
193
194 } // namespace content
OLDNEW
« no previous file with comments | « content/common/font_cache_dispatcher_win.h ('k') | content/common/font_config_ipc_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698