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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/layers/LayerTreeModel.js

Issue 2543633009: [Devtools] Template fromTarget() function calls to model (Closed)
Patch Set: fix Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 30 matching lines...) Expand all
41 } 41 }
42 42
43 /** 43 /**
44 * @param {!SDK.Target} target 44 * @param {!SDK.Target} target
45 * @return {?Layers.LayerTreeModel} 45 * @return {?Layers.LayerTreeModel}
46 */ 46 */
47 static fromTarget(target) { 47 static fromTarget(target) {
48 if (!target.hasDOMCapability()) 48 if (!target.hasDOMCapability())
49 return null; 49 return null;
50 50
51 var model = /** @type {?Layers.LayerTreeModel} */ (target.model(Layers.Layer TreeModel)); 51 var model = target.model(Layers.LayerTreeModel);
52 if (!model) 52 if (!model)
53 model = new Layers.LayerTreeModel(target); 53 model = new Layers.LayerTreeModel(target);
54 return model; 54 return model;
55 } 55 }
56 56
57 disable() { 57 disable() {
58 if (!this._enabled) 58 if (!this._enabled)
59 return; 59 return;
60 this._enabled = false; 60 this._enabled = false;
61 this.target().layerTreeAgent().disable(); 61 this.target().layerTreeAgent().disable();
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 560
561 /** 561 /**
562 * @override 562 * @override
563 * @param {!Protocol.LayerTree.LayerId} layerId 563 * @param {!Protocol.LayerTree.LayerId} layerId
564 * @param {!Protocol.DOM.Rect} clipRect 564 * @param {!Protocol.DOM.Rect} clipRect
565 */ 565 */
566 layerPainted(layerId, clipRect) { 566 layerPainted(layerId, clipRect) {
567 this._layerTreeModel._layerPainted(layerId, clipRect); 567 this._layerTreeModel._layerPainted(layerId, clipRect);
568 } 568 }
569 }; 569 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698