Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1792 } | 1792 } |
| 1793 | 1793 |
| 1794 markUndoableState() { | 1794 markUndoableState() { |
| 1795 this._agent.markUndoableState(); | 1795 this._agent.markUndoableState(); |
| 1796 } | 1796 } |
| 1797 | 1797 |
| 1798 /** | 1798 /** |
| 1799 * @param {function(?Protocol.Error)=} callback | 1799 * @param {function(?Protocol.Error)=} callback |
| 1800 */ | 1800 */ |
| 1801 undo(callback) { | 1801 undo(callback) { |
| 1802 /** | |
| 1803 * @param {?Protocol.Error} error | |
| 1804 * @this {SDK.DOMModel} | |
| 1805 */ | |
| 1806 function mycallback(error) { | |
| 1807 this.dispatchEventToListeners(SDK.DOMModel.Events.UndoRedoCompleted); | |
| 1808 callback(error); | |
| 1809 } | |
| 1810 | |
| 1811 this.dispatchEventToListeners(SDK.DOMModel.Events.UndoRedoRequested); | |
|
einbinder
2016/12/10 00:47:37
Nothing even uses these events.
| |
| 1812 this._agent.undo(callback); | 1802 this._agent.undo(callback); |
| 1813 } | 1803 } |
| 1814 | 1804 |
| 1815 /** | 1805 /** |
| 1816 * @param {function(?Protocol.Error)=} callback | 1806 * @param {function(?Protocol.Error)=} callback |
| 1817 */ | 1807 */ |
| 1818 redo(callback) { | 1808 redo(callback) { |
| 1819 /** | |
| 1820 * @param {?Protocol.Error} error | |
| 1821 * @this {SDK.DOMModel} | |
| 1822 */ | |
| 1823 function mycallback(error) { | |
| 1824 this.dispatchEventToListeners(SDK.DOMModel.Events.UndoRedoCompleted); | |
| 1825 callback(error); | |
| 1826 } | |
| 1827 | |
| 1828 this.dispatchEventToListeners(SDK.DOMModel.Events.UndoRedoRequested); | |
| 1829 this._agent.redo(callback); | 1809 this._agent.redo(callback); |
| 1830 } | 1810 } |
| 1831 | 1811 |
| 1832 /** | 1812 /** |
| 1833 * @param {?SDK.DOMNodeHighlighter} highlighter | 1813 * @param {?SDK.DOMNodeHighlighter} highlighter |
| 1834 */ | 1814 */ |
| 1835 setHighlighter(highlighter) { | 1815 setHighlighter(highlighter) { |
| 1836 this._highlighter = highlighter || this._defaultHighlighter; | 1816 this._highlighter = highlighter || this._defaultHighlighter; |
| 1837 } | 1817 } |
| 1838 | 1818 |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2162 /** | 2142 /** |
| 2163 * @override | 2143 * @override |
| 2164 * @param {!Protocol.Page.FrameId} frameId | 2144 * @param {!Protocol.Page.FrameId} frameId |
| 2165 */ | 2145 */ |
| 2166 highlightFrame(frameId) { | 2146 highlightFrame(frameId) { |
| 2167 this._agent.highlightFrame( | 2147 this._agent.highlightFrame( |
| 2168 frameId, Common.Color.PageHighlight.Content.toProtocolRGBA(), | 2148 frameId, Common.Color.PageHighlight.Content.toProtocolRGBA(), |
| 2169 Common.Color.PageHighlight.ContentOutline.toProtocolRGBA()); | 2149 Common.Color.PageHighlight.ContentOutline.toProtocolRGBA()); |
| 2170 } | 2150 } |
| 2171 }; | 2151 }; |
| OLD | NEW |