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

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

Issue 245443005: Move IPC::MessageFilter and router to a separate file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix gn build Created 6 years, 8 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/common/font_cache_dispatcher_win.h" 5 #include "content/common/font_cache_dispatcher_win.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "content/common/child_process_messages.h" 12 #include "content/common/child_process_messages.h"
13 #include "ipc/ipc_channel.h"
13 14
14 namespace content { 15 namespace content {
15 namespace { 16 namespace {
16 typedef std::vector<base::string16> FontNameVector; 17 typedef std::vector<base::string16> FontNameVector;
17 typedef std::map<FontCacheDispatcher*, FontNameVector> DispatcherToFontNames; 18 typedef std::map<FontCacheDispatcher*, FontNameVector> DispatcherToFontNames;
18 19
19 class FontCache { 20 class FontCache {
20 public: 21 public:
21 static FontCache* GetInstance() { 22 static FontCache* GetInstance() {
22 return Singleton<FontCache>::get(); 23 return Singleton<FontCache>::get();
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 FontCache::GetInstance()->PreCacheFont(font, this); 186 FontCache::GetInstance()->PreCacheFont(font, this);
186 } 187 }
187 188
188 void FontCacheDispatcher::OnReleaseCachedFonts() { 189 void FontCacheDispatcher::OnReleaseCachedFonts() {
189 // Release cached fonts that requested from a pid by decrementing the ref 190 // Release cached fonts that requested from a pid by decrementing the ref
190 // count. When ref count is zero, the handles are released. 191 // count. When ref count is zero, the handles are released.
191 FontCache::GetInstance()->ReleaseCachedFonts(this); 192 FontCache::GetInstance()->ReleaseCachedFonts(this);
192 } 193 }
193 194
194 } // namespace content 195 } // namespace content
OLDNEW
« no previous file with comments | « content/common/font_cache_dispatcher_win.h ('k') | content/common/gpu/client/gpu_channel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698