summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/renderer_webkitclient_impl.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 19:36:41 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 19:36:41 +0000
commit46f36a49b661fe4af87e95befb659464e3b1fbbc (patch)
tree86a774a4175c32c882460e61ec9081800fa0ca56 /chrome/renderer/renderer_webkitclient_impl.h
parentbf19ce759d2e46e7f1f8839c9f2791f5f7661929 (diff)
downloadchromium_src-46f36a49b661fe4af87e95befb659464e3b1fbbc.zip
chromium_src-46f36a49b661fe4af87e95befb659464e3b1fbbc.tar.gz
chromium_src-46f36a49b661fe4af87e95befb659464e3b1fbbc.tar.bz2
Header cleanup in chrome/renderer/.
In renderer_webkit_client_impl, several impl classes got moved to the implementation file. BUG=none TEST=none Review URL: http://codereview.chromium.org/3032027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53996 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_webkitclient_impl.h')
-rw-r--r--chrome/renderer/renderer_webkitclient_impl.h77
1 files changed, 13 insertions, 64 deletions
diff --git a/chrome/renderer/renderer_webkitclient_impl.h b/chrome/renderer/renderer_webkitclient_impl.h
index 5d58641..c93666c 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_;
};