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

Unified Diff: webkit/port/page/inspector/InspectorController.cpp

Issue 466: Try again to begin compiling the files that implemen the HTML5... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/build/webkit_common_includes.vsprops ('k') | webkit/webkit.sln » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/port/page/inspector/InspectorController.cpp
===================================================================
--- webkit/port/page/inspector/InspectorController.cpp (revision 1746)
+++ webkit/port/page/inspector/InspectorController.cpp (working copy)
@@ -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 @@
#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 @@
, scriptObject(0)
{
}
+#endif
};
#endif
@@ -908,6 +915,7 @@
#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 @@
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 @@
{ "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 @@
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 @@
#endif
#if ENABLE(DATABASE)
+#if ENABLE_DATABASE_INSPECTION
JSObjectRef InspectorController::addDatabaseScriptResource(InspectorDatabaseResource* resource)
{
ASSERT_ARG(resource, resource);
@@ -2306,6 +2320,7 @@
HANDLE_EXCEPTION(exception);
}
#endif
+#endif
#if USE(JAVASCRIPTCORE_BINDINGS)
void InspectorController::addScriptConsoleMessage(const ConsoleMessage* message)
@@ -2434,12 +2449,14 @@
}
#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 @@
m_consoleMessages.clear();
#if ENABLE(DATABASE)
+#if ENABLE_DATABASE_INSPECTION
m_databaseResources.clear();
#endif
+#endif
if (windowVisible()) {
resetScriptObjects();
@@ -2729,6 +2748,7 @@
#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 @@
if (windowVisible())
addDatabaseScriptResource(resource.get());
+#endif
}
#endif
« no previous file with comments | « webkit/build/webkit_common_includes.vsprops ('k') | webkit/webkit.sln » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698