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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/screencast/ScreencastView.js

Issue 2782773002: [DevTools] Remove SDKModels' fromTarget methods (Closed)
Patch Set: addressed review comments Created 3 years, 8 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
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 21 matching lines...) Expand all
32 * @unrestricted 32 * @unrestricted
33 */ 33 */
34 Screencast.ScreencastView = class extends UI.VBox { 34 Screencast.ScreencastView = class extends UI.VBox {
35 /** 35 /**
36 * @param {!SDK.ScreenCaptureModel} screenCaptureModel 36 * @param {!SDK.ScreenCaptureModel} screenCaptureModel
37 */ 37 */
38 constructor(screenCaptureModel) { 38 constructor(screenCaptureModel) {
39 super(); 39 super();
40 this._target = screenCaptureModel.target(); 40 this._target = screenCaptureModel.target();
41 this._screenCaptureModel = screenCaptureModel; 41 this._screenCaptureModel = screenCaptureModel;
42 this._domModel = SDK.DOMModel.fromTarget(this._target); 42 this._domModel = this._target.model(SDK.DOMModel);
43 this._resourceTreeModel = SDK.ResourceTreeModel.fromTarget(this._target); 43 this._resourceTreeModel = this._target.model(SDK.ResourceTreeModel);
44 44
45 this.setMinimumSize(150, 150); 45 this.setMinimumSize(150, 150);
46 this.registerRequiredCSS('screencast/screencastView.css'); 46 this.registerRequiredCSS('screencast/screencastView.css');
47 } 47 }
48 48
49 initialize() { 49 initialize() {
50 this.element.classList.add('screencast'); 50 this.element.classList.add('screencast');
51 51
52 this._createNavigationBar(); 52 this._createNavigationBar();
53 53
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 if (this._maxDisplayedProgress >= progress) 865 if (this._maxDisplayedProgress >= progress)
866 return; 866 return;
867 this._maxDisplayedProgress = progress; 867 this._maxDisplayedProgress = progress;
868 this._displayProgress(progress); 868 this._displayProgress(progress);
869 } 869 }
870 870
871 _displayProgress(progress) { 871 _displayProgress(progress) {
872 this._element.style.width = (100 * progress) + '%'; 872 this._element.style.width = (100 * progress) + '%';
873 } 873 }
874 }; 874 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698