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

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

Issue 6136005: Chromium support for window.webkitRequestAnimationFrame() (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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 const WebRect& clip_rect) { 676 const WebRect& clip_rect) {
677 if (WebWidgetHost* host = GetWidgetHost()) 677 if (WebWidgetHost* host = GetWidgetHost())
678 host->DidScrollRect(dx, dy, clip_rect); 678 host->DidScrollRect(dx, dy, clip_rect);
679 } 679 }
680 680
681 void TestWebViewDelegate::scheduleComposite() { 681 void TestWebViewDelegate::scheduleComposite() {
682 if (WebWidgetHost* host = GetWidgetHost()) 682 if (WebWidgetHost* host = GetWidgetHost())
683 host->ScheduleComposite(); 683 host->ScheduleComposite();
684 } 684 }
685 685
686 void TestWebViewDelegate::scheduleAnimation() {
687 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
darin (slow to review) 2011/01/11 22:02:30 nit: indentation Piggy backing on scheduleComposi
jamesr 2011/01/12 00:02:43 It's a pain to do deferred work in WebWidgetHost s
688 this, &TestWebViewDelegate::scheduleComposite));
689 }
690
686 void TestWebViewDelegate::didFocus() { 691 void TestWebViewDelegate::didFocus() {
687 if (WebWidgetHost* host = GetWidgetHost()) 692 if (WebWidgetHost* host = GetWidgetHost())
688 shell_->SetFocus(host, true); 693 shell_->SetFocus(host, true);
689 } 694 }
690 695
691 void TestWebViewDelegate::didBlur() { 696 void TestWebViewDelegate::didBlur() {
692 if (WebWidgetHost* host = GetWidgetHost()) 697 if (WebWidgetHost* host = GetWidgetHost())
693 shell_->SetFocus(host, false); 698 shell_->SetFocus(host, false);
694 } 699 }
695 700
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 } 1326 }
1322 1327
1323 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1328 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1324 fake_rect_ = rect; 1329 fake_rect_ = rect;
1325 using_fake_rect_ = true; 1330 using_fake_rect_ = true;
1326 } 1331 }
1327 1332
1328 WebRect TestWebViewDelegate::fake_window_rect() { 1333 WebRect TestWebViewDelegate::fake_window_rect() {
1329 return fake_rect_; 1334 return fake_rect_;
1330 } 1335 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698