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

Side by Side Diff: client/html/src/WindowWrappingImplementation.dart

Issue 8363040: Implement measurement using futures (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove duplicated imports from html.dart Created 9 years, 1 month 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
« no previous file with comments | « client/html/src/Window.dart ('k') | client/layout/GridLayout.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // TODO(jacobr): define a base class containing the overlap between 5 // TODO(jacobr): define a base class containing the overlap between
6 // this class and ElementEvents. 6 // this class and ElementEvents.
7 class WindowEventsImplementation extends EventsImplementation 7 class WindowEventsImplementation extends EventsImplementation
8 implements WindowEvents { 8 implements WindowEvents {
9 WindowEventsImplementation._wrap(_ptr) : super._wrap(_ptr); 9 WindowEventsImplementation._wrap(_ptr) : super._wrap(_ptr);
10 10
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } 590 }
591 591
592 bool confirm([String message = null]) { 592 bool confirm([String message = null]) {
593 if (message === null) { 593 if (message === null) {
594 return _ptr.confirm(); 594 return _ptr.confirm();
595 } else { 595 } else {
596 return _ptr.confirm(message); 596 return _ptr.confirm(message);
597 } 597 }
598 } 598 }
599 599
600 FileReader createFileReader() { 600 FileReader createFileReader() =>
601 return LevelDom.wrapFileReader(_ptr.createFileReader()); 601 LevelDom.wrapFileReader(_ptr.createFileReader());
602 }
603 602
604 CSSMatrix createCSSMatrix([String cssValue = null]) { 603 CSSMatrix createCSSMatrix([String cssValue = null]) {
605 if (cssValue === null) { 604 if (cssValue === null) {
606 return LevelDom.wrapCSSMatrix(_ptr.createWebKitCSSMatrix()); 605 return LevelDom.wrapCSSMatrix(_ptr.createWebKitCSSMatrix());
607 } else { 606 } else {
608 return LevelDom.wrapCSSMatrix(_ptr.createWebKitCSSMatrix(cssValue)); 607 return LevelDom.wrapCSSMatrix(_ptr.createWebKitCSSMatrix(cssValue));
609 } 608 }
610 } 609 }
611 610
612 bool find([String string = null, bool caseSensitive = null, bool backwards = n ull, bool wrap = null, bool wholeWord = null, bool searchInFrames = null, bool s howDialog = null]) { 611 bool find([String string = null, bool caseSensitive = null, bool backwards = n ull, bool wrap = null, bool wholeWord = null, bool searchInFrames = null, bool s howDialog = null]) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 } 680 }
682 } 681 }
683 } 682 }
684 throw "Incorrect number or type of arguments"; 683 throw "Incorrect number or type of arguments";
685 } 684 }
686 685
687 void focus() { 686 void focus() {
688 _ptr.focus(); 687 _ptr.focus();
689 } 688 }
690 689
691 CSSStyleDeclaration getComputedStyle([Element element = null, String pseudoEle ment = null]) { 690 DOMSelection getSelection() =>
692 if (element === null) { 691 LevelDom.wrapDOMSelection(_ptr.getSelection());
693 if (pseudoElement === null) {
694 return LevelDom.wrapCSSStyleDeclaration(_ptr.getComputedStyle());
695 }
696 } else {
697 if (pseudoElement === null) {
698 return LevelDom.wrapCSSStyleDeclaration(_ptr.getComputedStyle(LevelDom.u nwrap(element)));
699 } else {
700 return LevelDom.wrapCSSStyleDeclaration(_ptr.getComputedStyle(LevelDom.u nwrap(element), pseudoElement));
701 }
702 }
703 throw "Incorrect number or type of arguments";
704 }
705
706 DOMSelection getSelection() {
707 return LevelDom.wrapDOMSelection(_ptr.getSelection());
708 }
709 692
710 MediaQueryList matchMedia(String query) { 693 MediaQueryList matchMedia(String query) {
711 return LevelDom.wrapMediaQueryList(_ptr.matchMedia(query)); 694 return LevelDom.wrapMediaQueryList(_ptr.matchMedia(query));
712 } 695 }
713 696
714 void moveBy(num x, num y) { 697 void moveBy(num x, num y) {
715 _ptr.moveBy(x, y); 698 _ptr.moveBy(x, y);
716 } 699 }
717 700
718 void moveTo(num x, num y) { 701 void moveTo(num x, num y) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 } 764 }
782 765
783 void scrollBy(int x, int y) { 766 void scrollBy(int x, int y) {
784 _ptr.scrollBy(x, y); 767 _ptr.scrollBy(x, y);
785 } 768 }
786 769
787 void scrollTo(int x, int y) { 770 void scrollTo(int x, int y) {
788 _ptr.scrollTo(x, y); 771 _ptr.scrollTo(x, y);
789 } 772 }
790 773
791 int setInterval(TimeoutHandler handler, int timeout) { 774 int setInterval(TimeoutHandler handler, int timeout) =>
792 return _ptr.setInterval(handler, timeout); 775 _ptr.setInterval(handler, timeout);
793 }
794 776
795 int setTimeout([TimeoutHandler handler = null, int timeout = null]) { 777 int setTimeout(TimeoutHandler handler, int timeout) =>
796 if (handler === null) { 778 _ptr.setTimeout(handler, timeout);
797 if (timeout === null) {
798 return _ptr.setTimeout();
799 }
800 } else {
801 if (timeout === null) {
802 return _ptr.setTimeout(handler);
803 } else {
804 return _ptr.setTimeout(handler, timeout);
805 }
806 }
807 throw "Incorrect number or type of arguments";
808 }
809 779
810 Object showModalDialog(String url, [Object dialogArgs = null, String featureAr gs = null]) { 780 Object showModalDialog(String url, [Object dialogArgs = null, String featureAr gs = null]) {
811 if (dialogArgs === null) { 781 if (dialogArgs === null) {
812 if (featureArgs === null) { 782 if (featureArgs === null) {
813 return _ptr.showModalDialog(url); 783 return _ptr.showModalDialog(url);
814 } 784 }
815 } else { 785 } else {
816 if (featureArgs === null) { 786 if (featureArgs === null) {
817 return _ptr.showModalDialog(url, LevelDom.unwrap(dialogArgs)); 787 return _ptr.showModalDialog(url, LevelDom.unwrap(dialogArgs));
818 } else { 788 } else {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 return LevelDom.wrapPoint(_ptr.webkitConvertPointFromPageToNode(LevelDom .unwrap(node), LevelDom.unwrap(p))); 828 return LevelDom.wrapPoint(_ptr.webkitConvertPointFromPageToNode(LevelDom .unwrap(node), LevelDom.unwrap(p)));
859 } 829 }
860 } 830 }
861 throw "Incorrect number or type of arguments"; 831 throw "Incorrect number or type of arguments";
862 } 832 }
863 833
864 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Eleme nt element = null]) { 834 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Eleme nt element = null]) {
865 if (element === null) { 835 if (element === null) {
866 return _ptr.webkitRequestAnimationFrame(callback); 836 return _ptr.webkitRequestAnimationFrame(callback);
867 } else { 837 } else {
868 return _ptr.webkitRequestAnimationFrame(callback, LevelDom.unwrap(element) ); 838 return _ptr.webkitRequestAnimationFrame(
839 callback, LevelDom.unwrap(element));
869 } 840 }
870 } 841 }
871 842
843 void requestLayoutFrame(TimeoutHandler callback) {
844 _addMeasurementFrameCallback(callback);
845 }
846
872 WindowEvents get on() { 847 WindowEvents get on() {
873 if (_on === null) { 848 if (_on === null) {
874 _on = new WindowEventsImplementation._wrap(_ptr); 849 _on = new WindowEventsImplementation._wrap(_ptr);
875 } 850 }
876 return _on; 851 return _on;
877 } 852 }
878 } 853 }
OLDNEW
« no previous file with comments | « client/html/src/Window.dart ('k') | client/layout/GridLayout.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698