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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js

Issue 2587293002: DevTools: teach TabbedPane.setTabIcon to accept UI.Icon instances (Closed)
Patch Set: Created 3 years, 12 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) 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 */ 165 */
166 showPanel(panelName) { 166 showPanel(panelName) {
167 return UI.viewManager.showView(panelName); 167 return UI.viewManager.showView(panelName);
168 } 168 }
169 169
170 /** 170 /**
171 * @param {string} panelName 171 * @param {string} panelName
172 * @param {string} iconType 172 * @param {string} iconType
173 * @param {string=} iconTooltip 173 * @param {string=} iconTooltip
174 */ 174 */
175 setPanelIcon(panelName, iconType, iconTooltip) { 175 setPanelIcon(panelName, iconType, iconTooltip) {
dgozman 2016/12/20 05:42:04 Let's change this one to accept Icon instead.
lushnikov 2016/12/20 06:52:10 Done.
176 this._tabbedPane.setTabIcon(panelName, iconType, iconTooltip); 176 var icon = null;
177 if (iconType) {
178 icon = UI.Icon.create(iconType);
179 icon.title = iconTooltip || '';
180 }
181 this._tabbedPane.setTabIcon(panelName, icon);
177 } 182 }
178 183
179 /** 184 /**
180 * @return {!UI.Panel} 185 * @return {!UI.Panel}
181 */ 186 */
182 currentPanelDeprecated() { 187 currentPanelDeprecated() {
183 return /** @type {!UI.Panel} */ (UI.viewManager.materializedWidget(this._tab bedPane.selectedTabId || '')); 188 return /** @type {!UI.Panel} */ (UI.viewManager.materializedWidget(this._tab bedPane.selectedTabId || ''));
184 } 189 }
185 190
186 /** 191 /**
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 * @return {boolean} 319 * @return {boolean}
315 */ 320 */
316 handleAction(context, actionId) { 321 handleAction(context, actionId) {
317 if (UI.inspectorView.drawerVisible()) 322 if (UI.inspectorView.drawerVisible())
318 UI.inspectorView._closeDrawer(); 323 UI.inspectorView._closeDrawer();
319 else 324 else
320 UI.inspectorView._showDrawer(true); 325 UI.inspectorView._showDrawer(true);
321 return true; 326 return true;
322 } 327 }
323 }; 328 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698