Updates V8 bindings to use INSPECTOR guard.

Also adds PLATFORM(ANDROID) guards around Android-specific changes that have yet to be upstreamed to webkit.org.

Change-Id: If6634f8800832dc31713b9558e86f528489bb537
diff --git a/WebCore/bindings/v8/DOMObjectsInclude.h b/WebCore/bindings/v8/DOMObjectsInclude.h
index fe04518..ec5c466 100644
--- a/WebCore/bindings/v8/DOMObjectsInclude.h
+++ b/WebCore/bindings/v8/DOMObjectsInclude.h
@@ -105,7 +105,6 @@
 #include "HTMLSelectElement.h"
 #include "HTMLOptionsCollection.h"
 #include "ImageData.h"
-#include "InspectorBackend.h"
 #include "KeyboardEvent.h"
 #include "Location.h"
 #include "Media.h"
@@ -233,11 +232,14 @@
 #include "V8SVGPODTypeWrapper.h"
 #endif // SVG
 
-#if ENABLE(TOUCH_EVENTS) // Android
+#if PLATFORM(ANDROID)
+// TODO: Upstream TOUCH_EVENTS guard.
+#if ENABLE(TOUCH_EVENTS)
 #include "Touch.h"
 #include "TouchList.h"
 #include "TouchEvent.h"
 #endif
+#endif
 
 #if ENABLE(WEB_SOCKETS)
 #include "WebSocket.h"
@@ -260,6 +262,13 @@
 #include "XPathEvaluator.h"
 #endif // XPATH
 
+#if PLATFORM(ANDROID)
+// TODO: Upstream INSPECTOR guard.
+#if ENABLE(INSPECTOR)
+#include "InspectorBackend.h"
+#endif // INSPECTOR
+#endif
+
 namespace WebCore {
 
     // A helper class for undetectable document.all
diff --git a/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp b/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
index 2d9715a..c56a695 100644
--- a/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
+++ b/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
@@ -175,11 +175,6 @@
 #include "bindings/V8HTMLUListElement.cpp"
 #include "bindings/V8HTMLVideoElement.cpp"
 #include "bindings/V8ImageData.cpp"
-#if PLATFORM(ANDROID)
-// No inspector for now
-#else
-#include "bindings/V8InspectorBackend.cpp"
-#endif
 #include "bindings/V8KeyboardEvent.cpp"
 #include "bindings/V8Location.cpp"
 #include "bindings/V8Media.cpp"
@@ -406,3 +401,10 @@
 #include "bindings/V8XSLTProcessor.cpp"
 #endif
 #endif
+
+#if PLATFORM(ANDROID)
+// TODO: Upstream INSPECTOR guard.
+#if ENABLE(INSPECTOR)
+#include "bindings/V8InspectorBackend.cpp"
+#endif
+#endif
diff --git a/WebCore/bindings/v8/V8Index.cpp b/WebCore/bindings/v8/V8Index.cpp
index d93a48f..396c93f 100644
--- a/WebCore/bindings/v8/V8Index.cpp
+++ b/WebCore/bindings/v8/V8Index.cpp
@@ -142,9 +142,6 @@
 #include "V8HTMLTitleElement.h"
 #include "V8HTMLUListElement.h"
 #include "V8ImageData.h"
-#if !PLATFORM(ANDROID)
-#include "V8InspectorBackend.h"
-#endif
 #include "V8Media.h"
 #include "V8MediaList.h"
 #include "V8MessageChannel.h"
@@ -448,6 +445,10 @@
 #include "V8XSLTProcessor.h"
 #endif
 
+#if ENABLE(INSPECTOR)
+#include "V8InspectorBackend.h"
+#endif
+
 #include "V8VoidCallback.h"
 #endif  // PLATFORM(ANDROID)
 
diff --git a/WebCore/bindings/v8/V8Index.h b/WebCore/bindings/v8/V8Index.h
index 097197e..6255079 100644
--- a/WebCore/bindings/v8/V8Index.h
+++ b/WebCore/bindings/v8/V8Index.h
@@ -463,6 +463,8 @@
 #define DOM_OBJECT_3D_CANVAS_TYPES(V)
 #endif
 
+#if PLATFORM(ANDROID)
+// TODO: Upstream these guards.
 #if ENABLE(TOUCH_EVENTS)
 #define DOM_OBJECT_TOUCH_EVENT_TYPES(V)                                 \
     V(TOUCHLIST, TouchList)                                             \
@@ -500,12 +502,13 @@
 #define DOM_OBJECT_GEOLOCATION_TYPES(V)
 #endif
 
-#if !PLATFORM(ANDROID)
+#if ENABLE(INSPECTOR)
 #define DOM_OBJECT_INSPECTOR_TYPES(V)                                   \
     V(INSPECTORBACKEND, InspectorBackend)
 #else
 #define DOM_OBJECT_INSPECTOR_TYPES(V)
 #endif
+#endif
 
 #if PLATFORM(ANDROID)
 #define DOM_OBJECT_VOIDCALLBACK_TYPES(V)                                \