[chromium] WebViewHost should use ENABLE guards for some features.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 07:13:52 +0000 (07:13 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 07:13:52 +0000 (07:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=87087

Patch by Hao Zheng <zhenghao@chromium.org> on 2012-05-22
Reviewed by Kent Tamura.

These features are disabled on OS(ANDROID) and so shouldn't be
compiled when the feature is off.

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::reset):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117920 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/chromium/WebViewHost.cpp
Tools/DumpRenderTree/chromium/WebViewHost.h

index c32faa4..bace191 100644 (file)
@@ -1,3 +1,18 @@
+2012-05-22  Hao Zheng  <zhenghao@chromium.org>
+
+        [chromium] WebViewHost should use ENABLE guards for some features.
+        https://bugs.webkit.org/show_bug.cgi?id=87087
+
+        Reviewed by Kent Tamura.
+
+        These features are disabled on OS(ANDROID) and so shouldn't be
+        compiled when the feature is off.
+
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::reset):
+        * DumpRenderTree/chromium/WebViewHost.h:
+        (WebViewHost):
+
 2012-05-21  Christophe Dumez  <christophe.dumez@intel.com>
 
         [EFL] EFL's DumpRenderTree does not print didReceiveTitle messages
index 598fe89..9da8e83 100644 (file)
@@ -676,10 +676,12 @@ void WebViewHost::postAccessibilityNotification(const WebAccessibilityObject& ob
     }
 }
 
+#if ENABLE(NOTIFICATIONS)
 WebNotificationPresenter* WebViewHost::notificationPresenter()
 {
     return m_shell->notificationPresenter();
 }
+#endif
 
 WebKit::WebGeolocationClient* WebViewHost::geolocationClient()
 {
@@ -693,12 +695,14 @@ WebKit::WebGeolocationClientMock* WebViewHost::geolocationClientMock()
     return m_geolocationClientMock.get();
 }
 
+#if ENABLE(INPUT_SPEECH)
 WebSpeechInputController* WebViewHost::speechInputController(WebKit::WebSpeechInputListener* listener)
 {
     if (!m_speechInputControllerMock)
         m_speechInputControllerMock = MockWebSpeechInputController::create(listener);
     return m_speechInputControllerMock.get();
 }
+#endif
 
 WebDeviceOrientationClientMock* WebViewHost::deviceOrientationClientMock()
 {
@@ -1457,8 +1461,10 @@ void WebViewHost::reset()
     if (m_geolocationClientMock.get())
         m_geolocationClientMock->resetMock();
 
+#if ENABLE(INPUT_SPEECH)
     if (m_speechInputControllerMock.get())
         m_speechInputControllerMock->clearResults();
+#endif
 
     m_currentCursor = WebCursorInfo();
     m_windowRect = WebRect();
index a830f59..c5f9301 100644 (file)
@@ -111,7 +111,9 @@ class WebViewHost : public WebKit::WebSpellCheckClient, public WebKit::WebViewCl
     WebKit::WebContextMenuData* lastContextMenuData() const;
     void clearContextMenuData();
 
+#if ENABLE(INPUT_SPEECH)
     MockWebSpeechInputController* speechInputControllerMock() { return m_speechInputControllerMock.get(); }
+#endif
 
 #if ENABLE(POINTER_LOCK)
     void didLosePointerLock();
@@ -162,9 +164,13 @@ class WebViewHost : public WebKit::WebSpellCheckClient, public WebKit::WebViewCl
     virtual int historyBackListCount();
     virtual int historyForwardListCount();
     virtual void postAccessibilityNotification(const WebKit::WebAccessibilityObject&, WebKit::WebAccessibilityNotification);
+#if ENABLE(NOTIFICATIONS)
     virtual WebKit::WebNotificationPresenter* notificationPresenter();
+#endif
     virtual WebKit::WebGeolocationClient* geolocationClient();
+#if ENABLE(INPUT_SPEECH)
     virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*);
+#endif
     virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient();
 #if ENABLE(MEDIA_STREAM)
     virtual WebKit::WebUserMediaClient* userMediaClient();
@@ -397,7 +403,9 @@ private:
     OwnPtr<WebKit::WebGeolocationClientMock> m_geolocationClientMock;
 
     OwnPtr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationClientMock;
+#if ENABLE(INPUT_SPEECH)
     OwnPtr<MockWebSpeechInputController> m_speechInputControllerMock;
+#endif
 
 #if ENABLE(MEDIA_STREAM)
     OwnPtr<WebKit::WebUserMediaClientMock> m_userMediaClientMock;