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

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

Issue 6007006: Support for requestAnimationFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 const WebRect& clip_rect) { 696 const WebRect& clip_rect) {
697 if (WebWidgetHost* host = GetWidgetHost()) 697 if (WebWidgetHost* host = GetWidgetHost())
698 host->DidScrollRect(dx, dy, clip_rect); 698 host->DidScrollRect(dx, dy, clip_rect);
699 } 699 }
700 700
701 void TestWebViewDelegate::scheduleComposite() { 701 void TestWebViewDelegate::scheduleComposite() {
702 if (WebWidgetHost* host = GetWidgetHost()) 702 if (WebWidgetHost* host = GetWidgetHost())
703 host->ScheduleComposite(); 703 host->ScheduleComposite();
704 } 704 }
705 705
706 void TestWebViewDelegate::scheduleAnimation() {
707 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
708 this, &TestWebViewDelegate::scheduleComposite));
709 }
710
706 void TestWebViewDelegate::didFocus() { 711 void TestWebViewDelegate::didFocus() {
707 if (WebWidgetHost* host = GetWidgetHost()) 712 if (WebWidgetHost* host = GetWidgetHost())
708 shell_->SetFocus(host, true); 713 shell_->SetFocus(host, true);
709 } 714 }
710 715
711 void TestWebViewDelegate::didBlur() { 716 void TestWebViewDelegate::didBlur() {
712 if (WebWidgetHost* host = GetWidgetHost()) 717 if (WebWidgetHost* host = GetWidgetHost())
713 shell_->SetFocus(host, false); 718 shell_->SetFocus(host, false);
714 } 719 }
715 720
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 #endif 1360 #endif
1356 1361
1357 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1362 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1358 fake_rect_ = rect; 1363 fake_rect_ = rect;
1359 using_fake_rect_ = true; 1364 using_fake_rect_ = true;
1360 } 1365 }
1361 1366
1362 WebRect TestWebViewDelegate::fake_window_rect() { 1367 WebRect TestWebViewDelegate::fake_window_rect() {
1363 return fake_rect_; 1368 return fake_rect_;
1364 } 1369 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | webkit/tools/test_shell/webwidget_host_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698