OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 | 701 |
702 pctx.fillStyle = "rgb(225, 225, 225)"; | 702 pctx.fillStyle = "rgb(225, 225, 225)"; |
703 pctx.fillRect(0, 0, size, size); | 703 pctx.fillRect(0, 0, size, size); |
704 pctx.fillRect(size, size, size, size); | 704 pctx.fillRect(size, size, size, size); |
705 return context.createPattern(pattern, "repeat"); | 705 return context.createPattern(pattern, "repeat"); |
706 }, | 706 }, |
707 | 707 |
708 _createNavigationBar: function() | 708 _createNavigationBar: function() |
709 { | 709 { |
710 this._navigationBar = this.element.createChild("div", "screencast-naviga
tion"); | 710 this._navigationBar = this.element.createChild("div", "screencast-naviga
tion"); |
711 if (Runtime.queryParam("hideNavigation")) | |
712 this._navigationBar.classList.add("hidden"); | |
713 | 711 |
714 this._navigationBack = this._navigationBar.createChild("button", "back")
; | 712 this._navigationBack = this._navigationBar.createChild("button", "back")
; |
715 this._navigationBack.disabled = true; | 713 this._navigationBack.disabled = true; |
716 this._navigationBack.addEventListener("click", this._navigateToHistoryEn
try.bind(this, -1), false); | 714 this._navigationBack.addEventListener("click", this._navigateToHistoryEn
try.bind(this, -1), false); |
717 | 715 |
718 this._navigationForward = this._navigationBar.createChild("button", "for
ward"); | 716 this._navigationForward = this._navigationBar.createChild("button", "for
ward"); |
719 this._navigationForward.disabled = true; | 717 this._navigationForward.disabled = true; |
720 this._navigationForward.addEventListener("click", this._navigateToHistor
yEntry.bind(this, 1), false); | 718 this._navigationForward.addEventListener("click", this._navigateToHistor
yEntry.bind(this, 1), false); |
721 | 719 |
722 this._navigationReload = this._navigationBar.createChild("button", "relo
ad"); | 720 this._navigationReload = this._navigationBar.createChild("button", "relo
ad"); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 return; | 863 return; |
866 this._maxDisplayedProgress = progress; | 864 this._maxDisplayedProgress = progress; |
867 this._displayProgress(progress); | 865 this._displayProgress(progress); |
868 }, | 866 }, |
869 | 867 |
870 _displayProgress: function(progress) | 868 _displayProgress: function(progress) |
871 { | 869 { |
872 this._element.style.width = (100 * progress) + "%"; | 870 this._element.style.width = (100 * progress) + "%"; |
873 } | 871 } |
874 }; | 872 }; |
OLD | NEW |