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

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

Issue 980883002: Merge 190855 "[DevTools] Teach MediaQueryInspector about disabli..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2311/
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | Source/devtools/front_end/toolbox/MediaQueryInspector.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 MediaQueryResultChanged: "MediaQueryResultChanged", 77 MediaQueryResultChanged: "MediaQueryResultChanged",
78 } 78 }
79 79
80 WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld ", "print", "projection", "screen", "speech", "tty", "tv"]; 80 WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld ", "print", "projection", "screen", "speech", "tty", "tv"];
81 81
82 WebInspector.CSSStyleModel.prototype = { 82 WebInspector.CSSStyleModel.prototype = {
83 suspendModel: function() 83 suspendModel: function()
84 { 84 {
85 this._agent.disable(); 85 this._agent.disable();
86 this._isEnabled = false; 86 this._isEnabled = false;
87 this._resetStyleSheets();
88 }, 87 },
89 88
90 resumeModel: function() 89 resumeModel: function()
91 { 90 {
91 this._resetStyleSheets();
92 this._agent.enable(this._wasEnabled.bind(this)); 92 this._agent.enable(this._wasEnabled.bind(this));
93 }, 93 },
94 94
95 /** 95 /**
96 * @param {function(!Array.<!WebInspector.CSSMedia>)} userCallback 96 * @param {function(!Array.<!WebInspector.CSSMedia>)} userCallback
97 */ 97 */
98 getMediaQueries: function(userCallback) 98 getMediaQueries: function(userCallback)
99 { 99 {
100 /** 100 /**
101 * @param {?Protocol.Error} error 101 * @param {?Protocol.Error} error
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 // The loader has been reset. 1820 // The loader has been reset.
1821 if (!callbacks) 1821 if (!callbacks)
1822 return; 1822 return;
1823 1823
1824 delete this._nodeIdToCallbackData[nodeId]; 1824 delete this._nodeIdToCallbackData[nodeId];
1825 for (var i = 0; i < callbacks.length; ++i) 1825 for (var i = 0; i < callbacks.length; ++i)
1826 callbacks[i](computedStyle); 1826 callbacks[i](computedStyle);
1827 } 1827 }
1828 } 1828 }
1829 } 1829 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/toolbox/MediaQueryInspector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698