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

Side by Side Diff: chrome/renderer/renderer_webkitclient_impl.h

Issue 2846018: Revert "Mac: Infrastructure for serialization of OS fonts over IPC." (Closed)
Patch Set: Created 10 years, 6 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 | « chrome/common/font_loader_mac.h ('k') | chrome/renderer/renderer_webkitclient_impl.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_RENDERER_RENDERER_WEBKITCLIENT_IMPL_H_ 5 #ifndef CHROME_RENDERER_RENDERER_WEBKITCLIENT_IMPL_H_
6 #define CHROME_RENDERER_RENDERER_WEBKITCLIENT_IMPL_H_ 6 #define CHROME_RENDERER_RENDERER_WEBKITCLIENT_IMPL_H_
7 7
8 #include "base/platform_file.h" 8 #include "base/platform_file.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "chrome/renderer/websharedworkerrepository_impl.h" 10 #include "chrome/renderer/websharedworkerrepository_impl.h"
11 #include "webkit/glue/simple_webmimeregistry_impl.h" 11 #include "webkit/glue/simple_webmimeregistry_impl.h"
12 #include "webkit/glue/webclipboard_impl.h" 12 #include "webkit/glue/webclipboard_impl.h"
13 #include "webkit/glue/webfilesystem_impl.h" 13 #include "webkit/glue/webfilesystem_impl.h"
14 #include "webkit/glue/webkitclient_impl.h" 14 #include "webkit/glue/webkitclient_impl.h"
15 15
16 #if defined(OS_WIN) 16 #if defined(OS_WIN)
17 #include "third_party/WebKit/WebKit/chromium/public/win/WebSandboxSupport.h" 17 #include "third_party/WebKit/WebKit/chromium/public/win/WebSandboxSupport.h"
18 #elif defined(OS_LINUX) 18 #elif defined(OS_LINUX)
19 #include <string> 19 #include <string>
20 #include <map> 20 #include <map>
21 #include "base/lock.h" 21 #include "base/lock.h"
22 #include "third_party/WebKit/WebKit/chromium/public/linux/WebSandboxSupport.h" 22 #include "third_party/WebKit/WebKit/chromium/public/linux/WebSandboxSupport.h"
23 #elif defined(OS_MACOSX)
24 #include "third_party/WebKit/WebKit/chromium/public/mac/WebSandboxSupport.h"
25 #endif 23 #endif
26 24
27 namespace IPC { 25 namespace IPC {
28 class SyncMessage; 26 class SyncMessage;
29 } 27 }
30 28
31 class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { 29 class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl {
32 public: 30 public:
33 RendererWebKitClientImpl(); 31 RendererWebKitClientImpl();
34 virtual ~RendererWebKitClientImpl(); 32 virtual ~RendererWebKitClientImpl();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out); 106 const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out);
109 107
110 private: 108 private:
111 // WebKit likes to ask us for the correct font family to use for a set of 109 // WebKit likes to ask us for the correct font family to use for a set of
112 // unicode code points. It needs this information frequently so we cache it 110 // unicode code points. It needs this information frequently so we cache it
113 // here. The key in this map is an array of 16-bit UTF16 values from WebKit. 111 // here. The key in this map is an array of 16-bit UTF16 values from WebKit.
114 // The value is a string containing the correct font family. 112 // The value is a string containing the correct font family.
115 Lock unicode_font_families_mutex_; 113 Lock unicode_font_families_mutex_;
116 std::map<std::string, std::string> unicode_font_families_; 114 std::map<std::string, std::string> unicode_font_families_;
117 }; 115 };
118 #elif defined(OS_MACOSX)
119 class SandboxSupport : public WebKit::WebSandboxSupport {
120 public:
121 virtual bool loadFont(NSFont* srcFont, ATSFontContainerRef* out);
122 };
123 #endif 116 #endif
124 117
125 // Helper function to send synchronous message from any thread. 118 // Helper function to send synchronous message from any thread.
126 static bool SendSyncMessageFromAnyThread(IPC::SyncMessage* msg); 119 static bool SendSyncMessageFromAnyThread(IPC::SyncMessage* msg);
127 120
128 webkit_glue::WebClipboardImpl clipboard_; 121 webkit_glue::WebClipboardImpl clipboard_;
129 122
130 FileSystem file_system_; 123 FileSystem file_system_;
131 124
132 MimeRegistry mime_registry_; 125 MimeRegistry mime_registry_;
133 126 #if defined(OS_WIN) || defined(OS_LINUX)
134 SandboxSupport sandbox_support_; 127 SandboxSupport sandbox_support_;
128 #endif
135 129
136 // This counter keeps track of the number of times sudden termination is 130 // This counter keeps track of the number of times sudden termination is
137 // enabled or disabled. It starts at 0 (enabled) and for every disable 131 // enabled or disabled. It starts at 0 (enabled) and for every disable
138 // increments by 1, for every enable decrements by 1. When it reaches 0, 132 // increments by 1, for every enable decrements by 1. When it reaches 0,
139 // we tell the browser to enable fast termination. 133 // we tell the browser to enable fast termination.
140 int sudden_termination_disables_; 134 int sudden_termination_disables_;
141 135
142 // Implementation of the WebSharedWorkerRepository APIs (provides an interface 136 // Implementation of the WebSharedWorkerRepository APIs (provides an interface
143 // to WorkerService on the browser thread. 137 // to WorkerService on the browser thread.
144 WebSharedWorkerRepositoryImpl shared_worker_repository_; 138 WebSharedWorkerRepositoryImpl shared_worker_repository_;
145 139
146 scoped_ptr<WebKit::WebIndexedDatabase> web_indexed_database_; 140 scoped_ptr<WebKit::WebIndexedDatabase> web_indexed_database_;
147 }; 141 };
148 142
149 #endif // CHROME_RENDERER_RENDERER_WEBKITCLIENT_IMPL_H_ 143 #endif // CHROME_RENDERER_RENDERER_WEBKITCLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/common/font_loader_mac.h ('k') | chrome/renderer/renderer_webkitclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698