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

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 6283019: Render using WebPaintSurface. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 return shell_->device_orientation_client_mock(); 643 return shell_->device_orientation_client_mock();
644 } 644 }
645 645
646 WebKit::WebSpeechInputController* TestWebViewDelegate::speechInputController( 646 WebKit::WebSpeechInputController* TestWebViewDelegate::speechInputController(
647 WebKit::WebSpeechInputListener* listener) { 647 WebKit::WebSpeechInputListener* listener) {
648 return shell_->CreateSpeechInputControllerMock(listener); 648 return shell_->CreateSpeechInputControllerMock(listener);
649 } 649 }
650 650
651 // WebWidgetClient ----------------------------------------------------------- 651 // WebWidgetClient -----------------------------------------------------------
652 652
653 #if WEBKIT_USING_PAINTSURFACE
654
655 WebKit::WebPaintSurface* TestWebViewDelegate::paintSurface() {
656 if (WebWidgetHost* host = GetWidgetHost())
657 return host->GetPaintSurface();
658
659 return NULL;
660 }
661
662 #else // WEBKIT_USING_PAINTSURFACE
663
653 void TestWebViewDelegate::didInvalidateRect(const WebRect& rect) { 664 void TestWebViewDelegate::didInvalidateRect(const WebRect& rect) {
654 if (WebWidgetHost* host = GetWidgetHost()) 665 if (WebWidgetHost* host = GetWidgetHost())
655 host->DidInvalidateRect(rect); 666 host->DidInvalidateRect(rect);
656 } 667 }
657 668
658 void TestWebViewDelegate::didScrollRect(int dx, int dy, 669 void TestWebViewDelegate::didScrollRect(int dx, int dy,
659 const WebRect& clip_rect) { 670 const WebRect& clip_rect) {
660 if (WebWidgetHost* host = GetWidgetHost()) 671 if (WebWidgetHost* host = GetWidgetHost())
661 host->DidScrollRect(dx, dy, clip_rect); 672 host->DidScrollRect(dx, dy, clip_rect);
662 } 673 }
663 674
675 #endif // WEBKIT_USING_PAINTSURFACE
676
664 void TestWebViewDelegate::scheduleComposite() { 677 void TestWebViewDelegate::scheduleComposite() {
665 if (WebWidgetHost* host = GetWidgetHost()) 678 if (WebWidgetHost* host = GetWidgetHost())
666 host->ScheduleComposite(); 679 host->ScheduleComposite();
667 } 680 }
668 681
669 void TestWebViewDelegate::scheduleAnimation() { 682 void TestWebViewDelegate::scheduleAnimation() {
670 if (WebWidgetHost* host = GetWidgetHost()) 683 if (WebWidgetHost* host = GetWidgetHost())
671 host->ScheduleAnimation(); 684 host->ScheduleAnimation();
672 } 685 }
673 686
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 } 1336 }
1324 1337
1325 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1338 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1326 fake_rect_ = rect; 1339 fake_rect_ = rect;
1327 using_fake_rect_ = true; 1340 using_fake_rect_ = true;
1328 } 1341 }
1329 1342
1330 WebRect TestWebViewDelegate::fake_window_rect() { 1343 WebRect TestWebViewDelegate::fake_window_rect() {
1331 return fake_rect_; 1344 return fake_rect_;
1332 } 1345 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | webkit/tools/test_shell/webwidget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698