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

Side by Side Diff: Source/devtools/front_end/sdk/StylesSourceMapping.js

Issue 298333003: DevTools: Implement console message logging through an extension (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Implement a common MessageSink Created 6 years, 6 months 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
OLDNEW
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
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 WebInspector.messageSink.addErrorMessage(error, true);
sergeyv 2014/05/29 12:44:06 ditto
apavlov 2014/05/29 13:47:46 Done.
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698