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

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

Issue 2349713003: IPC::MessageFilter::OnFilterAdded: IPC::Sender -> IPC::Channel (Closed)
Patch Set: . Created 4 years, 3 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
« no previous file with comments | « content/common/font_cache_dispatcher_win.h ('k') | content/gpu/gpu_child_thread.cc » ('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 <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 if (sender_) 144 if (sender_)
145 return sender_->Send(message); 145 return sender_->Send(message);
146 146
147 delete message; 147 delete message;
148 return false; 148 return false;
149 } 149 }
150 150
151 FontCacheDispatcher::~FontCacheDispatcher() { 151 FontCacheDispatcher::~FontCacheDispatcher() {
152 } 152 }
153 153
154 void FontCacheDispatcher::OnFilterAdded(IPC::Sender* sender) { 154 void FontCacheDispatcher::OnFilterAdded(IPC::Channel* channel) {
155 sender_ = sender; 155 sender_ = channel;
156 } 156 }
157 157
158 bool FontCacheDispatcher::OnMessageReceived(const IPC::Message& message) { 158 bool FontCacheDispatcher::OnMessageReceived(const IPC::Message& message) {
159 bool handled = true; 159 bool handled = true;
160 IPC_BEGIN_MESSAGE_MAP(FontCacheDispatcher, message) 160 IPC_BEGIN_MESSAGE_MAP(FontCacheDispatcher, message)
161 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_PreCacheFont, OnPreCacheFont) 161 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_PreCacheFont, OnPreCacheFont)
162 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ReleaseCachedFonts, 162 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ReleaseCachedFonts,
163 OnReleaseCachedFonts) 163 OnReleaseCachedFonts)
164 IPC_MESSAGE_UNHANDLED(handled = false) 164 IPC_MESSAGE_UNHANDLED(handled = false)
165 IPC_END_MESSAGE_MAP() 165 IPC_END_MESSAGE_MAP()
(...skipping 21 matching lines...) Expand all
187 FontCache::GetInstance()->PreCacheFont(font, this); 187 FontCache::GetInstance()->PreCacheFont(font, this);
188 } 188 }
189 189
190 void FontCacheDispatcher::OnReleaseCachedFonts() { 190 void FontCacheDispatcher::OnReleaseCachedFonts() {
191 // Release cached fonts that requested from a pid by decrementing the ref 191 // Release cached fonts that requested from a pid by decrementing the ref
192 // count. When ref count is zero, the handles are released. 192 // count. When ref count is zero, the handles are released.
193 FontCache::GetInstance()->ReleaseCachedFonts(this); 193 FontCache::GetInstance()->ReleaseCachedFonts(this);
194 } 194 }
195 195
196 } // namespace content 196 } // namespace content
OLDNEW
« no previous file with comments | « content/common/font_cache_dispatcher_win.h ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698