| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file contains the implementation of TestWebViewDelegate, which serves | 5 // This file contains the implementation of TestWebViewDelegate, which serves |
| 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to | 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to |
| 7 // have initialized a MessageLoop before these methods are called. | 7 // have initialized a MessageLoop before these methods are called. |
| 8 | 8 |
| 9 #include "webkit/tools/test_shell/test_webview_delegate.h" | 9 #include "webkit/tools/test_shell/test_webview_delegate.h" |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 33 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| 34 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" | 34 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" |
| 35 #include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" | 35 #include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" |
| 36 #include "third_party/WebKit/WebKit/chromium/public/WebNode.h" | 36 #include "third_party/WebKit/WebKit/chromium/public/WebNode.h" |
| 37 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h" | 37 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h" |
| 38 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" | 38 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" |
| 39 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" | 39 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" |
| 40 #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" | 40 #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" |
| 41 #include "third_party/WebKit/WebKit/chromium/public/WebRange.h" | 41 #include "third_party/WebKit/WebKit/chromium/public/WebRange.h" |
| 42 #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" | 42 #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" |
| 43 #include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputController.h" |
| 44 #include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputControllerMock
.h" |
| 45 #include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputListener.h" |
| 43 #include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" | 46 #include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" |
| 44 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" | 47 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
| 45 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" | 48 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
| 46 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" | 49 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" |
| 47 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" | 50 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" |
| 48 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" | 51 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" |
| 49 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" | 52 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
| 50 #include "third_party/WebKit/WebKit/chromium/public/WebWindowFeatures.h" | 53 #include "third_party/WebKit/WebKit/chromium/public/WebWindowFeatures.h" |
| 51 #include "webkit/appcache/web_application_cache_host_impl.h" | 54 #include "webkit/appcache/web_application_cache_host_impl.h" |
| 52 #include "webkit/glue/glue_serialize.h" | 55 #include "webkit/glue/glue_serialize.h" |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 | 645 |
| 643 WebKit::WebGeolocationService* TestWebViewDelegate::geolocationService() { | 646 WebKit::WebGeolocationService* TestWebViewDelegate::geolocationService() { |
| 644 return GetTestGeolocationService(); | 647 return GetTestGeolocationService(); |
| 645 } | 648 } |
| 646 | 649 |
| 647 WebKit::WebDeviceOrientationClient* | 650 WebKit::WebDeviceOrientationClient* |
| 648 TestWebViewDelegate::deviceOrientationClient() { | 651 TestWebViewDelegate::deviceOrientationClient() { |
| 649 return shell_->device_orientation_client_mock(); | 652 return shell_->device_orientation_client_mock(); |
| 650 } | 653 } |
| 651 | 654 |
| 655 WebKit::WebSpeechInputController* TestWebViewDelegate::speechInputController( |
| 656 WebKit::WebSpeechInputListener* listener) { |
| 657 return shell_->CreateSpeechInputControllerMock(listener); |
| 658 } |
| 659 |
| 652 // WebWidgetClient ----------------------------------------------------------- | 660 // WebWidgetClient ----------------------------------------------------------- |
| 653 | 661 |
| 654 void TestWebViewDelegate::didInvalidateRect(const WebRect& rect) { | 662 void TestWebViewDelegate::didInvalidateRect(const WebRect& rect) { |
| 655 if (WebWidgetHost* host = GetWidgetHost()) | 663 if (WebWidgetHost* host = GetWidgetHost()) |
| 656 host->DidInvalidateRect(rect); | 664 host->DidInvalidateRect(rect); |
| 657 } | 665 } |
| 658 | 666 |
| 659 void TestWebViewDelegate::didScrollRect(int dx, int dy, | 667 void TestWebViewDelegate::didScrollRect(int dx, int dy, |
| 660 const WebRect& clip_rect) { | 668 const WebRect& clip_rect) { |
| 661 if (WebWidgetHost* host = GetWidgetHost()) | 669 if (WebWidgetHost* host = GetWidgetHost()) |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 } | 1341 } |
| 1334 | 1342 |
| 1335 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1343 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
| 1336 fake_rect_ = rect; | 1344 fake_rect_ = rect; |
| 1337 using_fake_rect_ = true; | 1345 using_fake_rect_ = true; |
| 1338 } | 1346 } |
| 1339 | 1347 |
| 1340 WebRect TestWebViewDelegate::fake_window_rect() { | 1348 WebRect TestWebViewDelegate::fake_window_rect() { |
| 1341 return fake_rect_; | 1349 return fake_rect_; |
| 1342 } | 1350 } |
| OLD | NEW |