Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 var api = {}; | 5 var api = {}; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Enumeration of scene update commands. | 8 * Enumeration of scene update commands. |
| 9 * @enum {number} | 9 * @enum {number} |
| 10 * @const | 10 * @const |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 620 */ | 620 */ |
| 621 onUpdateTab(tab) {} | 621 onUpdateTab(tab) {} |
| 622 | 622 |
| 623 /** | 623 /** |
| 624 * Remove a tab. | 624 * Remove a tab. |
| 625 * @param {Object} tab | 625 * @param {Object} tab |
| 626 */ | 626 */ |
| 627 onRemoveTab(tab) {} | 627 onRemoveTab(tab) {} |
| 628 | 628 |
| 629 /** | 629 /** |
| 630 * Set back/forward history buttons to enabled/disabled | |
|
mthiesse
2017/03/08 16:15:18
Nit: period at the end of sentences in comments
acondor_
2017/03/08 16:42:26
Done.
| |
| 631 * @param {boolean} canGoBack | |
| 632 * @param {boolean} canGoForward | |
| 633 */ | |
| 634 onSetHistoryButtonsEnabled(canGoBack, canGoForward) {} | |
| 635 | |
| 636 /** | |
| 630 * This function is executed after command parsing completes. | 637 * This function is executed after command parsing completes. |
| 631 */ | 638 */ |
| 632 onCommandHandlerFinished() {} | 639 onCommandHandlerFinished() {} |
| 633 | 640 |
| 634 /** @final */ | 641 /** @final */ |
| 635 handleCommand(dict) { | 642 handleCommand(dict) { |
| 636 if ('mode' in dict) { | 643 if ('mode' in dict) { |
| 637 this.onSetMode(dict['mode']); | 644 this.onSetMode(dict['mode']); |
| 638 } | 645 } |
| 639 if ('fullscreen' in dict) { | 646 if ('fullscreen' in dict) { |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 666 } | 673 } |
| 667 if ('setTabs' in dict) { | 674 if ('setTabs' in dict) { |
| 668 this.onSetTabs(dict['setTabs']); | 675 this.onSetTabs(dict['setTabs']); |
| 669 } | 676 } |
| 670 if ('updateTab' in dict) { | 677 if ('updateTab' in dict) { |
| 671 this.onUpdateTab(dict['updateTab']); | 678 this.onUpdateTab(dict['updateTab']); |
| 672 } | 679 } |
| 673 if ('removeTab' in dict) { | 680 if ('removeTab' in dict) { |
| 674 this.onRemoveTab(dict['removeTab']); | 681 this.onRemoveTab(dict['removeTab']); |
| 675 } | 682 } |
| 683 if ('canGoBack' in dict) { | |
| 684 this.onSetHistoryButtonsEnabled(dict['canGoBack'], dict['canGoForward']); | |
| 685 } | |
| 676 | 686 |
| 677 this.onCommandHandlerFinished() | 687 this.onCommandHandlerFinished() |
| 678 } | 688 } |
| 679 }; | 689 }; |
| OLD | NEW |