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

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

Issue 2587293002: DevTools: teach TabbedPane.setTabIcon to accept UI.Icon instances (Closed)
Patch Set: formatting 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/main/Main.js
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
index b7994b57a9b1c032fc5c3893658d409ab143217a..d6a7549a114febf0390184260604d1504f913591 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -767,12 +767,15 @@ Main.NetworkPanelIndicator = class {
updateVisibility();
function updateVisibility() {
- if (manager.isThrottling())
- UI.inspectorView.setPanelIcon('network', 'smallicon-warning', Common.UIString('Network throttling is enabled'));
- else if (blockedURLsSetting.get().length)
- UI.inspectorView.setPanelIcon('network', 'smallicon-warning', Common.UIString('Requests may be blocked'));
- else
- UI.inspectorView.setPanelIcon('network', '', '');
+ var icon = null;
+ if (manager.isThrottling()) {
+ icon = UI.Icon.create('smallicon-warning');
+ icon.title = Common.UIString('Network throttling is enabled');
+ } else if (blockedURLsSetting.get().length) {
+ icon = UI.Icon.create('smallicon-warning');
+ icon.title = Common.UIString('Requests may be blocked');
+ }
+ UI.inspectorView.setPanelIcon('network', icon);
}
}
};
@@ -786,11 +789,13 @@ Main.SourcesPanelIndicator = class {
javaScriptDisabledChanged();
function javaScriptDisabledChanged() {
+ var icon = null;
var javaScriptDisabled = Common.moduleSetting('javaScriptDisabled').get();
- if (javaScriptDisabled)
- UI.inspectorView.setPanelIcon('sources', 'smallicon-warning', Common.UIString('JavaScript is disabled'));
- else
- UI.inspectorView.setPanelIcon('sources', '', '');
+ if (javaScriptDisabled) {
+ icon = UI.Icon.create('smallicon-warning');
+ icon.title = Common.UIString('JavaScript is disabled');
+ }
+ UI.inspectorView.setPanelIcon('sources', icon);
}
}
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698