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

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

Issue 351303003: [DevTools] Switch from DIP to CSS pixels in device mode. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed comments Created 6 years, 5 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 | « Source/devtools/front_end/responsiveDesignView.css ('k') | Source/devtools/protocol.json » ('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) 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ResourceAdded: "ResourceAdded", 64 ResourceAdded: "ResourceAdded",
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 } 76 }
76 77
77 WebInspector.ResourceTreeModel.prototype = { 78 WebInspector.ResourceTreeModel.prototype = {
78 _fetchResourceTree: function() 79 _fetchResourceTree: function()
79 { 80 {
80 /** @type {!Object.<string, !WebInspector.ResourceTreeFrame>} */ 81 /** @type {!Object.<string, !WebInspector.ResourceTreeFrame>} */
81 this._frames = {}; 82 this._frames = {};
82 delete this._cachedResourcesProcessed; 83 delete this._cachedResourcesProcessed;
83 this._agent.getResourceTree(this._processCachedResources.bind(this)); 84 this._agent.getResourceTree(this._processCachedResources.bind(this));
84 }, 85 },
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 { 805 {
805 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ScreencastFrame, {data:data, metadata:metadata}); 806 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ScreencastFrame, {data:data, metadata:metadata});
806 }, 807 },
807 808
808 /** 809 /**
809 * @param {boolean} visible 810 * @param {boolean} visible
810 */ 811 */
811 screencastVisibilityChanged: function(visible) 812 screencastVisibilityChanged: function(visible)
812 { 813 {
813 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ScreencastVisibilityChanged, {visible:visible}); 814 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ScreencastVisibilityChanged, {visible:visible});
815 },
816
817 /**
818 * @param {!PageAgent.Viewport=} viewport
819 */
820 viewportChanged: function(viewport)
821 {
822 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ViewportChanged, viewport);
814 } 823 }
815 } 824 }
816 825
817 /** 826 /**
818 * @type {!WebInspector.ResourceTreeModel} 827 * @type {!WebInspector.ResourceTreeModel}
819 */ 828 */
820 WebInspector.resourceTreeModel; 829 WebInspector.resourceTreeModel;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/responsiveDesignView.css ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698