2011-09-10 21:40:03 +02:00
|
|
|
// Copyright (c) 2011 The Chromium Embedded Framework Authors.
|
2010-10-03 23:04:50 +02:00
|
|
|
// Portions copyright (c) 2009 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef _BROWSER_WEBKIT_INIT_H
|
|
|
|
#define _BROWSER_WEBKIT_INIT_H
|
|
|
|
|
2011-12-16 15:51:10 +01:00
|
|
|
#include "base/compiler_specific.h"
|
|
|
|
|
2010-11-17 18:28:32 +01:00
|
|
|
#include "browser_appcache_system.h"
|
|
|
|
#include "browser_database_system.h"
|
|
|
|
#include "browser_file_system.h"
|
|
|
|
#include "browser_webblobregistry_impl.h"
|
|
|
|
#include "browser_webcookiejar_impl.h"
|
2011-12-16 15:51:10 +01:00
|
|
|
#include "simple_clipboard_impl.h"
|
2010-11-17 18:28:32 +01:00
|
|
|
|
2011-07-03 02:03:30 +02:00
|
|
|
#include "base/scoped_temp_dir.h"
|
2010-10-03 23:04:50 +02:00
|
|
|
#include "webkit/glue/simple_webmimeregistry_impl.h"
|
|
|
|
#include "webkit/glue/webclipboard_impl.h"
|
|
|
|
#include "webkit/glue/webfileutilities_impl.h"
|
2011-09-10 21:40:03 +02:00
|
|
|
#include "webkit/glue/webkitplatformsupport_impl.h"
|
2010-10-03 23:04:50 +02:00
|
|
|
|
|
|
|
|
2011-09-10 21:40:03 +02:00
|
|
|
class BrowserWebKitInit : public webkit_glue::WebKitPlatformSupportImpl {
|
2010-10-03 23:04:50 +02:00
|
|
|
public:
|
2011-09-10 21:40:03 +02:00
|
|
|
BrowserWebKitInit();
|
|
|
|
virtual ~BrowserWebKitInit();
|
|
|
|
|
|
|
|
virtual WebKit::WebMimeRegistry* mimeRegistry() OVERRIDE;
|
|
|
|
virtual WebKit::WebClipboard* clipboard() OVERRIDE;
|
|
|
|
virtual WebKit::WebFileUtilities* fileUtilities() OVERRIDE;
|
|
|
|
virtual WebKit::WebSandboxSupport* sandboxSupport() OVERRIDE;
|
|
|
|
virtual WebKit::WebBlobRegistry* blobRegistry() OVERRIDE;
|
|
|
|
virtual WebKit::WebCookieJar* cookieJar() OVERRIDE;
|
|
|
|
virtual WebKit::WebFileSystem* fileSystem() OVERRIDE ;
|
|
|
|
virtual bool sandboxEnabled() OVERRIDE;
|
|
|
|
virtual WebKit::WebKitPlatformSupport::FileHandle databaseOpenFile(
|
|
|
|
const WebKit::WebString& vfs_file_name, int desired_flags) OVERRIDE;
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name,
|
2011-09-10 21:40:03 +02:00
|
|
|
bool sync_dir) OVERRIDE;
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual long databaseGetFileAttributes(
|
2011-09-10 21:40:03 +02:00
|
|
|
const WebKit::WebString& vfs_file_name) OVERRIDE;
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual long long databaseGetFileSize(
|
2011-09-10 21:40:03 +02:00
|
|
|
const WebKit::WebString& vfs_file_name) OVERRIDE;
|
2011-07-03 02:03:30 +02:00
|
|
|
virtual long long databaseGetSpaceAvailableForOrigin(
|
2011-09-10 21:40:03 +02:00
|
|
|
const WebKit::WebString& origin_identifier) OVERRIDE;
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual unsigned long long visitedLinkHash(const char* canonicalURL,
|
2011-09-10 21:40:03 +02:00
|
|
|
size_t length) OVERRIDE;
|
|
|
|
virtual bool isLinkVisited(unsigned long long linkHash) OVERRIDE;
|
|
|
|
virtual WebKit::WebMessagePortChannel* createMessagePortChannel() OVERRIDE;
|
|
|
|
virtual void prefetchHostName(const WebKit::WebString&) OVERRIDE;
|
2011-12-02 19:06:28 +01:00
|
|
|
virtual void decrementStatsCounter(const char* name) OVERRIDE;
|
|
|
|
virtual void incrementStatsCounter(const char* name) OVERRIDE;
|
|
|
|
virtual void histogramCustomCounts(const char* name, int sample, int min,
|
|
|
|
int max, int bucket_count) OVERRIDE;
|
|
|
|
virtual void histogramEnumeration(const char* name, int sample,
|
|
|
|
int boundary_value) OVERRIDE;
|
|
|
|
virtual bool isTraceEventEnabled() const OVERRIDE;
|
|
|
|
virtual void traceEventBegin(const char* name, void* id,
|
|
|
|
const char* extra) OVERRIDE;
|
|
|
|
virtual void traceEventEnd(const char* name, void* id,
|
|
|
|
const char* extra) OVERRIDE;
|
2011-09-10 21:40:03 +02:00
|
|
|
virtual WebKit::WebData loadResource(const char* name) OVERRIDE;
|
|
|
|
virtual WebKit::WebString defaultLocale() OVERRIDE;
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual WebKit::WebStorageNamespace* createLocalStorageNamespace(
|
2011-09-10 21:40:03 +02:00
|
|
|
const WebKit::WebString& path, unsigned quota) OVERRIDE;
|
2010-10-22 02:13:43 +02:00
|
|
|
void dispatchStorageEvent(const WebKit::WebString& key,
|
|
|
|
const WebKit::WebString& old_value, const WebKit::WebString& new_value,
|
|
|
|
const WebKit::WebString& origin, const WebKit::WebURL& url,
|
2011-09-10 21:40:03 +02:00
|
|
|
bool is_local_storage) OVERRIDE;
|
|
|
|
virtual WebKit::WebIDBFactory* idbFactory() OVERRIDE;
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual void createIDBKeysFromSerializedValuesAndKeyPath(
|
|
|
|
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
|
|
|
|
const WebKit::WebString& keyPath,
|
2011-09-10 21:40:03 +02:00
|
|
|
WebKit::WebVector<WebKit::WebIDBKey>& keys_out) OVERRIDE;
|
2011-04-05 18:17:33 +02:00
|
|
|
virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue(
|
|
|
|
const WebKit::WebIDBKey& key,
|
|
|
|
const WebKit::WebSerializedScriptValue& value,
|
2011-09-10 21:40:03 +02:00
|
|
|
const WebKit::WebString& keyPath) OVERRIDE;
|
|
|
|
virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D() OVERRIDE;
|
2011-12-16 15:51:10 +01:00
|
|
|
virtual string16 GetLocalizedString(int message_id) OVERRIDE;
|
|
|
|
virtual base::StringPiece GetDataResource(int resource_id) OVERRIDE;
|
|
|
|
virtual void GetPlugins(bool refresh,
|
|
|
|
std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE;
|
|
|
|
virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader(
|
|
|
|
const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info)
|
|
|
|
OVERRIDE;
|
|
|
|
virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge(
|
|
|
|
WebKit::WebSocketStreamHandle* handle,
|
|
|
|
webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE;
|
2011-09-10 21:40:03 +02:00
|
|
|
virtual WebKit::WebString queryLocalizedString(
|
|
|
|
WebKit::WebLocalizedString::Name name) OVERRIDE;
|
|
|
|
virtual WebKit::WebString queryLocalizedString(
|
2011-05-20 16:42:25 +02:00
|
|
|
WebKit::WebLocalizedString::Name name, const WebKit::WebString& value)
|
2011-09-10 21:40:03 +02:00
|
|
|
OVERRIDE;
|
|
|
|
virtual WebKit::WebString queryLocalizedString(
|
2010-12-16 22:54:42 +01:00
|
|
|
WebKit::WebLocalizedString::Name name,
|
|
|
|
const WebKit::WebString& value1,
|
2011-09-10 21:40:03 +02:00
|
|
|
const WebKit::WebString& value2) OVERRIDE;
|
2010-12-16 22:54:42 +01:00
|
|
|
|
2010-10-03 23:04:50 +02:00
|
|
|
private:
|
|
|
|
webkit_glue::SimpleWebMimeRegistryImpl mime_registry_;
|
|
|
|
webkit_glue::WebClipboardImpl clipboard_;
|
2011-12-16 15:51:10 +01:00
|
|
|
SimpleClipboardClient clipboard_client_;
|
2010-10-03 23:04:50 +02:00
|
|
|
webkit_glue::WebFileUtilitiesImpl file_utilities_;
|
|
|
|
ScopedTempDir appcache_dir_;
|
|
|
|
BrowserAppCacheSystem appcache_system_;
|
|
|
|
BrowserDatabaseSystem database_system_;
|
|
|
|
BrowserWebCookieJarImpl cookie_jar_;
|
|
|
|
scoped_refptr<BrowserWebBlobRegistryImpl> blob_registry_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _BROWSER_WEBKIT_INIT_H
|