Index: chrome/renderer/renderer_webkitclient_impl.h |
diff --git a/chrome/renderer/renderer_webkitclient_impl.h b/chrome/renderer/renderer_webkitclient_impl.h |
index 5d586414bafb694344877fe45fb7dae2269f0fd4..c93666ca4613727e5b6067b88db593b3a1e0a4da 100644 |
--- a/chrome/renderer/renderer_webkitclient_impl.h |
+++ b/chrome/renderer/renderer_webkitclient_impl.h |
@@ -8,27 +8,18 @@ |
#include "base/platform_file.h" |
#include "base/scoped_ptr.h" |
-#include "chrome/renderer/websharedworkerrepository_impl.h" |
-#include "webkit/glue/simple_webmimeregistry_impl.h" |
-#include "webkit/glue/webclipboard_impl.h" |
-#include "webkit/glue/webfilesystem_impl.h" |
#include "webkit/glue/webkitclient_impl.h" |
-#if defined(OS_WIN) |
-#include "third_party/WebKit/WebKit/chromium/public/win/WebSandboxSupport.h" |
-#elif defined(OS_LINUX) |
-#include <string> |
-#include <map> |
-#include "base/lock.h" |
-#include "third_party/WebKit/WebKit/chromium/public/linux/WebSandboxSupport.h" |
-#elif defined(OS_MACOSX) |
-#include "third_party/WebKit/WebKit/chromium/public/mac/WebSandboxSupport.h" |
-#endif |
+class WebSharedWorkerRepositoryImpl; |
namespace IPC { |
class SyncMessage; |
} |
+namespace webkit_glue { |
+class WebClipboardImpl; |
+} |
+ |
class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { |
public: |
RendererWebKitClientImpl(); |
@@ -76,63 +67,21 @@ class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { |
virtual WebKit::WebGLES2Context* createGLES2Context(); |
private: |
- class MimeRegistry : public webkit_glue::SimpleWebMimeRegistryImpl { |
- public: |
- virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&); |
- virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); |
- virtual WebKit::WebString preferredExtensionForMIMEType( |
- const WebKit::WebString&); |
- }; |
- |
- class FileSystem : public webkit_glue::WebFileSystemImpl { |
- public: |
- virtual bool getFileSize(const WebKit::WebString& path, long long& result); |
- virtual bool getFileModificationTime(const WebKit::WebString& path, |
- double& result); |
- virtual base::PlatformFile openFile(const WebKit::WebString& path, |
- int mode); |
- }; |
- |
bool CheckPreparsedJsCachingEnabled() const; |
-#if defined(OS_WIN) |
- class SandboxSupport : public WebKit::WebSandboxSupport { |
- public: |
- virtual bool ensureFontLoaded(HFONT); |
- }; |
-#elif defined(OS_LINUX) |
- class SandboxSupport : public WebKit::WebSandboxSupport { |
- public: |
- virtual WebKit::WebString getFontFamilyForCharacters( |
- const WebKit::WebUChar* characters, size_t numCharacters); |
- virtual void getRenderStyleForStrike( |
- const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out); |
- |
- private: |
- // WebKit likes to ask us for the correct font family to use for a set of |
- // unicode code points. It needs this information frequently so we cache it |
- // here. The key in this map is an array of 16-bit UTF16 values from WebKit. |
- // The value is a string containing the correct font family. |
- Lock unicode_font_families_mutex_; |
- std::map<std::string, std::string> unicode_font_families_; |
- }; |
-#elif defined(OS_MACOSX) |
- class SandboxSupport : public WebKit::WebSandboxSupport { |
- public: |
- virtual bool loadFont(NSFont* srcFont, ATSFontContainerRef* out); |
- }; |
-#endif |
- |
// Helper function to send synchronous message from any thread. |
static bool SendSyncMessageFromAnyThread(IPC::SyncMessage* msg); |
- webkit_glue::WebClipboardImpl clipboard_; |
+ scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_; |
- FileSystem file_system_; |
+ class FileSystem; |
+ scoped_ptr<FileSystem> file_system_; |
- MimeRegistry mime_registry_; |
+ class MimeRegistry; |
+ scoped_ptr<MimeRegistry> mime_registry_; |
- SandboxSupport sandbox_support_; |
+ class SandboxSupport; |
+ scoped_ptr<SandboxSupport> sandbox_support_; |
// This counter keeps track of the number of times sudden termination is |
// enabled or disabled. It starts at 0 (enabled) and for every disable |
@@ -142,7 +91,7 @@ class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { |
// Implementation of the WebSharedWorkerRepository APIs (provides an interface |
// to WorkerService on the browser thread. |
- WebSharedWorkerRepositoryImpl shared_worker_repository_; |
+ scoped_ptr<WebSharedWorkerRepositoryImpl> shared_worker_repository_; |
scoped_ptr<WebKit::WebIndexedDatabase> web_indexed_database_; |
}; |