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

Unified Diff: content/common/child_process_host.h

Issue 8759013: Dispatch the Windows font caching IPCs in one filter. This avoids having the code that calls thos... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/child_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_process_host.h
===================================================================
--- content/common/child_process_host.h (revision 112358)
+++ content/common/child_process_host.h (working copy)
@@ -8,14 +8,9 @@
#include <string>
#include <vector>
-#include <map>
#include "build/build_config.h"
-#if defined(OS_WIN)
-#include <windows.h>
-#endif // defined(OS_WIN)
-
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
@@ -85,13 +80,6 @@
// On failure, returns an empty FilePath.
static FilePath GetChildPath(int flags);
-#if defined(OS_WIN)
- // See comments in the cc file. This is a common hack needed for a process
- // hosting a sandboxed child process. Hence it lives in this file.
- static void PreCacheFont(LOGFONT font, int pid);
- static void ReleaseCachedFonts(int pid);
-#endif // defined(OS_WIN)
-
// IPC::Message::Sender implementation.
virtual bool Send(IPC::Message* message) OVERRIDE;
@@ -165,35 +153,6 @@
ListenerHook listener_;
-#if defined (OS_WIN)
- class FontCache {
- public:
- static FontCache* GetInstance();
- void PreCacheFont(LOGFONT font, int process_id);
- void ReleaseCachedFonts(int process_id);
-
- private:
- struct CacheElement {
- CacheElement();
- ~CacheElement();
-
- HFONT font_;
- HDC dc_;
- int ref_count_;
- };
- friend struct DefaultSingletonTraits<FontCache>;
-
- FontCache();
- ~FontCache();
-
- std::map<string16, CacheElement> cache_;
- std::map<int, std::vector<string16> > process_id_font_map_;
- base::Lock mutex_;
-
- DISALLOW_COPY_AND_ASSIGN(FontCache);
- };
-#endif
-
bool opening_channel_; // True while we're waiting the channel to be opened.
scoped_ptr<IPC::Channel> channel_;
std::string channel_id_;
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698