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

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

Issue 475233003: DevTools: front-end part of color picker (behind experiment). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 WillLoadCachedResources: "WillLoadCachedResources", 65 WillLoadCachedResources: "WillLoadCachedResources",
66 CachedResourcesLoaded: "CachedResourcesLoaded", 66 CachedResourcesLoaded: "CachedResourcesLoaded",
67 DOMContentLoaded: "DOMContentLoaded", 67 DOMContentLoaded: "DOMContentLoaded",
68 Load: "Load", 68 Load: "Load",
69 WillReloadPage: "WillReloadPage", 69 WillReloadPage: "WillReloadPage",
70 InspectedURLChanged: "InspectedURLChanged", 70 InspectedURLChanged: "InspectedURLChanged",
71 SecurityOriginAdded: "SecurityOriginAdded", 71 SecurityOriginAdded: "SecurityOriginAdded",
72 SecurityOriginRemoved: "SecurityOriginRemoved", 72 SecurityOriginRemoved: "SecurityOriginRemoved",
73 ScreencastFrame: "ScreencastFrame", 73 ScreencastFrame: "ScreencastFrame",
74 ScreencastVisibilityChanged: "ScreencastVisibilityChanged", 74 ScreencastVisibilityChanged: "ScreencastVisibilityChanged",
75 ViewportChanged: "ViewportChanged" 75 ViewportChanged: "ViewportChanged",
76 ColorPicked: "ColorPicked"
76 } 77 }
77 78
78 WebInspector.ResourceTreeModel.prototype = { 79 WebInspector.ResourceTreeModel.prototype = {
79 _fetchResourceTree: function() 80 _fetchResourceTree: function()
80 { 81 {
81 /** @type {!Object.<string, !WebInspector.ResourceTreeFrame>} */ 82 /** @type {!Object.<string, !WebInspector.ResourceTreeFrame>} */
82 this._frames = {}; 83 this._frames = {};
83 delete this._cachedResourcesProcessed; 84 delete this._cachedResourcesProcessed;
84 this._agent.getResourceTree(this._processCachedResources.bind(this)); 85 this._agent.getResourceTree(this._processCachedResources.bind(this));
85 }, 86 },
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 { 816 {
816 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ScreencastVisibilityChanged, {visible:visible}); 817 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ScreencastVisibilityChanged, {visible:visible});
817 }, 818 },
818 819
819 /** 820 /**
820 * @param {!PageAgent.Viewport=} viewport 821 * @param {!PageAgent.Viewport=} viewport
821 */ 822 */
822 viewportChanged: function(viewport) 823 viewportChanged: function(viewport)
823 { 824 {
824 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ViewportChanged, viewport); 825 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ViewportChanged, viewport);
826 },
827
828 /**
829 * @param {!DOMAgent.RGBA} color
830 */
831 colorPicked: function(color)
832 {
833 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ColorPicked, color);
825 } 834 }
826 } 835 }
827 836
828 /** 837 /**
829 * @type {!WebInspector.ResourceTreeModel} 838 * @type {!WebInspector.ResourceTreeModel}
830 */ 839 */
831 WebInspector.resourceTreeModel; 840 WebInspector.resourceTreeModel;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698