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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 2758963002: [DevTools] Remove dependency from TargetManager to ResourceTreeModel (Closed)
Patch Set: review comments addressed Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 26 matching lines...) Expand all
37 */ 37 */
38 constructor() { 38 constructor() {
39 Main.Main._instanceForTest = this; 39 Main.Main._instanceForTest = this;
40 runOnWindowLoad(this._loaded.bind(this)); 40 runOnWindowLoad(this._loaded.bind(this));
41 } 41 }
42 42
43 /** 43 /**
44 * @param {boolean} hard 44 * @param {boolean} hard
45 */ 45 */
46 static _reloadPage(hard) { 46 static _reloadPage(hard) {
47 var mainTarget = SDK.targetManager.mainTarget(); 47 SDK.ResourceTreeModel.reloadAllPages(hard);
48 if (mainTarget && mainTarget.hasBrowserCapability())
49 SDK.targetManager.reloadPage(hard);
50 } 48 }
51 49
52 _loaded() { 50 _loaded() {
53 console.timeStamp('Main._loaded'); 51 console.timeStamp('Main._loaded');
54 Runtime.setPlatform(Host.platform()); 52 Runtime.setPlatform(Host.platform());
55 InspectorFrontendHost.getPreferences(this._gotPreferences.bind(this)); 53 InspectorFrontendHost.getPreferences(this._gotPreferences.bind(this));
56 } 54 }
57 55
58 /** 56 /**
59 * @param {!Object<string, string>} prefs 57 * @param {!Object<string, string>} prefs
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 * @override 951 * @override
954 * @return {?Element} 952 * @return {?Element}
955 */ 953 */
956 settingElement() { 954 settingElement() {
957 return UI.SettingsUI.createSettingCheckbox( 955 return UI.SettingsUI.createSettingCheckbox(
958 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' )); 956 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' ));
959 } 957 }
960 }; 958 };
961 959
962 new Main.Main(); 960 new Main.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698