diff options
author | aa@google.com <aa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-05 17:47:58 +0000 |
---|---|---|
committer | aa@google.com <aa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-05 17:47:58 +0000 |
commit | d89d9f0acc91fdbb0b90e137c19de0f328c0a40a (patch) | |
tree | 7e902c40394c4fecc6c8ad48455700df1731590b /webkit/port | |
parent | 4c55dad818867cce0dd451e9ddc345a8946342e5 (diff) | |
download | chromium_src-d89d9f0acc91fdbb0b90e137c19de0f328c0a40a.zip chromium_src-d89d9f0acc91fdbb0b90e137c19de0f328c0a40a.tar.gz chromium_src-d89d9f0acc91fdbb0b90e137c19de0f328c0a40a.tar.bz2 |
Try again to begin compiling the files that implemen the HTML5
database API.
This time, I added a project dependency from WebCore to sqlite
on every solution that includes WebCore.
Review URL: http://codereview.chromium.org/466
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1785 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r-- | webkit/port/page/inspector/InspectorController.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/webkit/port/page/inspector/InspectorController.cpp b/webkit/port/page/inspector/InspectorController.cpp index a34ad33..35c052f 100644 --- a/webkit/port/page/inspector/InspectorController.cpp +++ b/webkit/port/page/inspector/InspectorController.cpp @@ -89,10 +89,15 @@ #endif #include <wtf/RefCounted.h> +// TODO(aa): Implement database inspection and remove this macro. +#define ENABLE_DATABASE_INSPECTION 0 + #if ENABLE(DATABASE) #include "Database.h" +#if ENABLE_DATABASE_INSPECTION #include "JSDatabase.h" #endif +#endif #if USE(JAVASCRIPTCORE_BINDINGS) using namespace KJS; @@ -477,6 +482,7 @@ protected: #if ENABLE(DATABASE) struct InspectorDatabaseResource : public RefCounted<InspectorDatabaseResource> { +#if ENABLE_DATABASE_INSPECTION static PassRefPtr<InspectorDatabaseResource> create(Database* database, const String& domain, const String& name, const String& version) { // Apple changed the default refcount to 1: http://trac.webkit.org/changeset/30406 @@ -518,6 +524,7 @@ private: , scriptObject(0) { } +#endif }; #endif @@ -908,6 +915,7 @@ void InspectorController::search(Node* node, const String& target) { #endif #if ENABLE(DATABASE) +#if ENABLE_DATABASE_INSPECTION static JSValueRef databaseTableNames(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { InspectorController* controller = reinterpret_cast<InspectorController*>(JSObjectGetPrivate(thisObject)); @@ -962,6 +970,7 @@ static JSValueRef databaseTableNames(JSContextRef ctx, JSObjectRef /*function*/, return result; } #endif +#endif #if USE(JAVASCRIPTCORE_BINDINGS) static JSValueRef inspectedWindow(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef thisObject, size_t /*argumentCount*/, const JSValueRef[] /*arguments[]*/, JSValueRef* /*exception*/) @@ -1447,8 +1456,10 @@ void InspectorController::windowScriptObjectAvailable() { "detach", detach, kJSPropertyAttributeNone }, { "search", search, kJSPropertyAttributeNone }, #if ENABLE(DATABASE) +#if ENABLE_DATABASE_INSPECTION { "databaseTableNames", databaseTableNames, kJSPropertyAttributeNone }, #endif +#endif { "inspectedWindow", inspectedWindow, kJSPropertyAttributeNone }, { "localizedStringsURL", localizedStrings, kJSPropertyAttributeNone }, { "platform", platform, kJSPropertyAttributeNone }, @@ -2193,10 +2204,12 @@ void InspectorController::populateScriptObjects() addScriptConsoleMessage(m_consoleMessages[i]); #if ENABLE(DATABASE) +#if ENABLE_DATABASE_INSPECTION DatabaseResourcesSet::iterator databasesEnd = m_databaseResources.end(); for (DatabaseResourcesSet::iterator it = m_databaseResources.begin(); it != databasesEnd; ++it) addDatabaseScriptResource((*it).get()); #endif +#endif } #elif USE(V8_BINDING) void InspectorController::populateScriptObjects() @@ -2212,6 +2225,7 @@ void InspectorController::populateScriptObjects() #endif #if ENABLE(DATABASE) +#if ENABLE_DATABASE_INSPECTION JSObjectRef InspectorController::addDatabaseScriptResource(InspectorDatabaseResource* resource) { ASSERT_ARG(resource, resource); @@ -2306,6 +2320,7 @@ void InspectorController::removeDatabaseScriptResource(InspectorDatabaseResource HANDLE_EXCEPTION(exception); } #endif +#endif #if USE(JAVASCRIPTCORE_BINDINGS) void InspectorController::addScriptConsoleMessage(const ConsoleMessage* message) @@ -2434,12 +2449,14 @@ void InspectorController::resetScriptObjects() } #if ENABLE(DATABASE) +#if ENABLE_DATABASE_INSPECTION DatabaseResourcesSet::iterator databasesEnd = m_databaseResources.end(); for (DatabaseResourcesSet::iterator it = m_databaseResources.begin(); it != databasesEnd; ++it) { InspectorDatabaseResource* resource = (*it).get(); resource->setScriptObject(0, 0); } #endif +#endif #if USE(JAVASCRIPTCORE_BINDINGS) callSimpleFunction(m_scriptContext, m_scriptObject, "reset"); @@ -2486,8 +2503,10 @@ void InspectorController::didCommitLoad(DocumentLoader* loader) m_consoleMessages.clear(); #if ENABLE(DATABASE) +#if ENABLE_DATABASE_INSPECTION m_databaseResources.clear(); #endif +#endif if (windowVisible()) { resetScriptObjects(); @@ -2729,6 +2748,7 @@ void InspectorController::resourceRetrievedByXMLHttpRequest(unsigned long identi #if ENABLE(DATABASE) void InspectorController::didOpenDatabase(Database* database, const String& domain, const String& name, const String& version) { +#if ENABLE_DATABASE_INSPECTION if (!enabled()) return; @@ -2738,6 +2758,7 @@ void InspectorController::didOpenDatabase(Database* database, const String& doma if (windowVisible()) addDatabaseScriptResource(resource.get()); +#endif } #endif |