| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 this._isSettingContent = true; | 391 this._isSettingContent = true; |
| 392 this._mapping._setStyleContent(this._uiSourceCode, this._uiSourceCode.wo
rkingCopy(), majorChange, this._styleContentSet.bind(this)); | 392 this._mapping._setStyleContent(this._uiSourceCode, this._uiSourceCode.wo
rkingCopy(), majorChange, this._styleContentSet.bind(this)); |
| 393 }, | 393 }, |
| 394 | 394 |
| 395 /** | 395 /** |
| 396 * @param {?string} error | 396 * @param {?string} error |
| 397 */ | 397 */ |
| 398 _styleContentSet: function(error) | 398 _styleContentSet: function(error) |
| 399 { | 399 { |
| 400 if (error) | 400 if (error) |
| 401 WebInspector.console.showErrorMessage(error); | 401 this._mapping._cssModel.target().consoleModel.showErrorMessage(error
); |
| 402 delete this._isSettingContent; | 402 delete this._isSettingContent; |
| 403 this._maybeProcessChange(); | 403 this._maybeProcessChange(); |
| 404 }, | 404 }, |
| 405 | 405 |
| 406 _clearIncrementalUpdateTimer: function() | 406 _clearIncrementalUpdateTimer: function() |
| 407 { | 407 { |
| 408 if (!this._incrementalUpdateTimer) | 408 if (!this._incrementalUpdateTimer) |
| 409 return; | 409 return; |
| 410 clearTimeout(this._incrementalUpdateTimer); | 410 clearTimeout(this._incrementalUpdateTimer); |
| 411 delete this._incrementalUpdateTimer; | 411 delete this._incrementalUpdateTimer; |
| 412 }, | 412 }, |
| 413 | 413 |
| 414 /** | 414 /** |
| 415 * @param {string} content | 415 * @param {string} content |
| 416 */ | 416 */ |
| 417 addRevision: function(content) | 417 addRevision: function(content) |
| 418 { | 418 { |
| 419 this._isAddingRevision = true; | 419 this._isAddingRevision = true; |
| 420 this._uiSourceCode.addRevision(content); | 420 this._uiSourceCode.addRevision(content); |
| 421 delete this._isAddingRevision; | 421 delete this._isAddingRevision; |
| 422 }, | 422 }, |
| 423 | 423 |
| 424 dispose: function() | 424 dispose: function() |
| 425 { | 425 { |
| 426 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyCommitted, this._workingCopyCommitted, this); | 426 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyCommitted, this._workingCopyCommitted, this); |
| 427 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyChanged, this._workingCopyChanged, this); | 427 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyChanged, this._workingCopyChanged, this); |
| 428 } | 428 } |
| 429 } | 429 } |
| OLD | NEW |