Title: [97379] trunk
Revision
97379
Author
[email protected]
Date
2011-10-13 12:06:43 -0700 (Thu, 13 Oct 2011)

Log Message

[Chromium] Allow building without speech input enabled.
https://bugs.webkit.org/show_bug.cgi?id=69867

Reviewed by Darin Fisher.

Source/WebKit/chromium:

* src/AssertMatchingEnums.cpp:
* src/WebSpeechInputControllerMockImpl.cpp:
(WebKit::WebSpeechInputControllerMock::create):
* src/WebSpeechInputControllerMockImpl.h:
* src/WebSpeechInputResult.cpp:

Tools:

* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::addMockSpeechInputResult):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (97378 => 97379)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-10-13 19:04:43 UTC (rev 97378)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-10-13 19:06:43 UTC (rev 97379)
@@ -1,3 +1,16 @@
+2011-10-13  John Knottenbelt  <[email protected]>
+
+        [Chromium] Allow building without speech input enabled.
+        https://bugs.webkit.org/show_bug.cgi?id=69867
+
+        Reviewed by Darin Fisher.
+
+        * src/AssertMatchingEnums.cpp:
+        * src/WebSpeechInputControllerMockImpl.cpp:
+        (WebKit::WebSpeechInputControllerMock::create):
+        * src/WebSpeechInputControllerMockImpl.h:
+        * src/WebSpeechInputResult.cpp:
+
 2011-10-13  Peng Huang  <[email protected]>
 
         [chromium] Add a selectionBounds() method to WebWidget.

Modified: trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp (97378 => 97379)


--- trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp	2011-10-13 19:04:43 UTC (rev 97378)
+++ trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp	2011-10-13 19:06:43 UTC (rev 97379)
@@ -310,9 +310,11 @@
 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::TypeTouch, TouchIcon);
 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::TypeTouchPrecomposed, TouchPrecomposedIcon);
 
+#if ENABLE(INPUT_SPEECH)
 COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Idle, InputFieldSpeechButtonElement::Idle);
 COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Recording, InputFieldSpeechButtonElement::Recording);
 COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Recognizing, InputFieldSpeechButtonElement::Recognizing);
+#endif
 
 COMPILE_ASSERT_MATCHING_ENUM(WebNode::ElementNode, Node::ELEMENT_NODE);
 COMPILE_ASSERT_MATCHING_ENUM(WebNode::AttributeNode, Node::ATTRIBUTE_NODE);

Modified: trunk/Source/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp (97378 => 97379)


--- trunk/Source/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp	2011-10-13 19:04:43 UTC (rev 97378)
+++ trunk/Source/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp	2011-10-13 19:06:43 UTC (rev 97379)
@@ -31,6 +31,8 @@
 #include "config.h"
 #include "WebSpeechInputControllerMockImpl.h"
 
+#if ENABLE(INPUT_SPEECH)
+
 #include "PlatformString.h"
 #include "SecurityOrigin.h"
 #include "SpeechInputClientMock.h"
@@ -99,3 +101,17 @@
 }
 
 } // namespace WebKit
+
+#else
+
+namespace WebKit {
+
+WebSpeechInputControllerMock* WebSpeechInputControllerMock::create(WebSpeechInputListener* listener)
+{
+    return 0;
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INPUT_SPEECH)
+

Modified: trunk/Source/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h (97378 => 97379)


--- trunk/Source/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h	2011-10-13 19:04:43 UTC (rev 97378)
+++ trunk/Source/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h	2011-10-13 19:06:43 UTC (rev 97379)
@@ -37,6 +37,8 @@
 #include "WebString.h"
 #include <wtf/OwnPtr.h>
 
+#if ENABLE(INPUT_SPEECH)
+
 namespace WebCore {
 class SpeechInputClientMock;
 }
@@ -72,4 +74,6 @@
 
 } // namespace WebKit
 
+#endif // ENABLE(INPUT_SPEECH)
+
 #endif // WebSpeechInputControllerMockImpl_h

Modified: trunk/Source/WebKit/chromium/src/WebSpeechInputResult.cpp (97378 => 97379)


--- trunk/Source/WebKit/chromium/src/WebSpeechInputResult.cpp	2011-10-13 19:04:43 UTC (rev 97378)
+++ trunk/Source/WebKit/chromium/src/WebSpeechInputResult.cpp	2011-10-13 19:06:43 UTC (rev 97379)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "WebSpeechInputResult.h"
 
+#if ENABLE(INPUT_SPEECH)
+
 #include "SpeechInputResult.h"
 #include <wtf/PassRefPtr.h>
 
@@ -52,3 +54,5 @@
 }
 
 } // namespace WebKit
+
+#endif // ENABLE(INPUT_SPEECH)

Modified: trunk/Tools/ChangeLog (97378 => 97379)


--- trunk/Tools/ChangeLog	2011-10-13 19:04:43 UTC (rev 97378)
+++ trunk/Tools/ChangeLog	2011-10-13 19:06:43 UTC (rev 97379)
@@ -1,3 +1,13 @@
+2011-10-13  John Knottenbelt  <[email protected]>
+
+        [Chromium] Allow building without speech input enabled.
+        https://bugs.webkit.org/show_bug.cgi?id=69867
+
+        Reviewed by Darin Fisher.
+
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::addMockSpeechInputResult):
+
 2011-10-13  Kent Tamura  <[email protected]>
 
         [Chromium] A DRT fix for r97348.

Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp (97378 => 97379)


--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp	2011-10-13 19:04:43 UTC (rev 97378)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp	2011-10-13 19:06:43 UTC (rev 97379)
@@ -1722,7 +1722,8 @@
     if (arguments.size() < 3 || !arguments[0].isString() || !arguments[1].isNumber() || !arguments[2].isString())
         return;
 
-    m_shell->webViewHost()->speechInputControllerMock()->addMockRecognitionResult(cppVariantToWebString(arguments[0]), arguments[1].toDouble(), cppVariantToWebString(arguments[2]));
+    if (WebSpeechInputControllerMock* controller = m_shell->webViewHost()->speechInputControllerMock())
+        controller->addMockRecognitionResult(cppVariantToWebString(arguments[0]), arguments[1].toDouble(), cppVariantToWebString(arguments[2]));
 }
 
 void LayoutTestController::startSpeechInput(const CppArgumentList& arguments, CppVariant* result)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to