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

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

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/debug_flags.cc ('k') | content/common/font_cache_dispatcher_win.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 #ifndef CONTENT_COMMON_FONT_CACHE_DISPATCHER_WIN_H_ 5 #ifndef CONTENT_COMMON_FONT_CACHE_DISPATCHER_WIN_H_
6 #define CONTENT_COMMON_FONT_CACHE_DISPATCHER_WIN_H_ 6 #define CONTENT_COMMON_FONT_CACHE_DISPATCHER_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "ipc/ipc_channel_proxy.h" 12 #include "ipc/ipc_channel_proxy.h"
13 13
14 namespace content {
15
14 // Dispatches messages used for font caching on Windows. This is needed because 16 // Dispatches messages used for font caching on Windows. This is needed because
15 // Windows can't load fonts into its kernel cache in sandboxed processes. So the 17 // Windows can't load fonts into its kernel cache in sandboxed processes. So the
16 // sandboxed process asks the browser process to do this for it. 18 // sandboxed process asks the browser process to do this for it.
17 class FontCacheDispatcher : public IPC::ChannelProxy::MessageFilter, 19 class FontCacheDispatcher : public IPC::ChannelProxy::MessageFilter,
18 public IPC::Sender { 20 public IPC::Sender {
19 public: 21 public:
20 FontCacheDispatcher(); 22 FontCacheDispatcher();
21 virtual ~FontCacheDispatcher(); 23 virtual ~FontCacheDispatcher();
22 24
23 // IPC::Sender implementation: 25 // IPC::Sender implementation:
24 virtual bool Send(IPC::Message* message) OVERRIDE; 26 virtual bool Send(IPC::Message* message) OVERRIDE;
25 27
26 private: 28 private:
27 // IPC::ChannelProxy::MessageFilter implementation: 29 // IPC::ChannelProxy::MessageFilter implementation:
28 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; 30 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
29 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 31 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
30 virtual void OnChannelClosing() OVERRIDE; 32 virtual void OnChannelClosing() OVERRIDE;
31 33
32 // Message handlers. 34 // Message handlers.
33 void OnPreCacheFont(const LOGFONT& font); 35 void OnPreCacheFont(const LOGFONT& font);
34 void OnReleaseCachedFonts(); 36 void OnReleaseCachedFonts();
35 37
36 IPC::Channel* channel_; 38 IPC::Channel* channel_;
37 39
38 DISALLOW_COPY_AND_ASSIGN(FontCacheDispatcher); 40 DISALLOW_COPY_AND_ASSIGN(FontCacheDispatcher);
39 }; 41 };
40 42
43 } // namespace content
44
41 #endif // CONTENT_COMMON_FONT_CACHE_DISPATCHER_WIN_H_ 45 #endif // CONTENT_COMMON_FONT_CACHE_DISPATCHER_WIN_H_
OLDNEW
« no previous file with comments | « content/common/debug_flags.cc ('k') | content/common/font_cache_dispatcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698