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

Side by Side Diff: Source/devtools/front_end/network/NetworkPanel.js

Issue 1113813002: [DevTools] Rename View to Widget. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 this._filtersContainer.appendChild(this._filterBar.filtersElement()); 54 this._filtersContainer.appendChild(this._filterBar.filtersElement());
55 this._filterBar.addEventListener(WebInspector.FilterBar.Events.FiltersToggle d, this._onFiltersToggled, this); 55 this._filterBar.addEventListener(WebInspector.FilterBar.Events.FiltersToggle d, this._onFiltersToggled, this);
56 this._filterBar.setName("networkPanel", true); 56 this._filterBar.setName("networkPanel", true);
57 57
58 this._searchableView = new WebInspector.SearchableView(this); 58 this._searchableView = new WebInspector.SearchableView(this);
59 this._searchableView.setPlaceholder(WebInspector.UIString("Find by filename or path")); 59 this._searchableView.setPlaceholder(WebInspector.UIString("Find by filename or path"));
60 this._searchableView.show(this.element); 60 this._searchableView.show(this.element);
61 61
62 this._overview = new WebInspector.NetworkOverview(); 62 this._overview = new WebInspector.NetworkOverview();
63 63
64 this._splitView = new WebInspector.SplitView(true, false, "networkPanelSplit ViewState"); 64 this._splitWidget = new WebInspector.SplitWidget(true, false, "networkPanelS plitViewState");
65 this._splitView.hideMain(); 65 this._splitWidget.hideMain();
66 66
67 this._splitView.show(this._searchableView.element); 67 this._splitWidget.show(this._searchableView.element);
68 68
69 this._progressBarContainer = createElement("div"); 69 this._progressBarContainer = createElement("div");
70 this._createToolbarButtons(); 70 this._createToolbarButtons();
71 71
72 /** @type {!WebInspector.NetworkLogView} */ 72 /** @type {!WebInspector.NetworkLogView} */
73 this._networkLogView = new WebInspector.NetworkLogView(this._overview, this. _filterBar, this._progressBarContainer, this._networkLogLargeRowsSetting); 73 this._networkLogView = new WebInspector.NetworkLogView(this._overview, this. _filterBar, this._progressBarContainer, this._networkLogLargeRowsSetting);
74 this._splitView.setSidebarView(this._networkLogView); 74 this._splitWidget.setSidebarWidget(this._networkLogView);
75 75
76 this._detailsView = new WebInspector.VBox(); 76 this._detailsWidget = new WebInspector.VBox();
77 this._detailsView.element.classList.add("network-details-view"); 77 this._detailsWidget.element.classList.add("network-details-view");
78 this._splitView.setMainView(this._detailsView); 78 this._splitWidget.setMainWidget(this._detailsWidget);
79 79
80 this._closeButtonElement = createElementWithClass("div", "network-close-butt on", "dt-close-button"); 80 this._closeButtonElement = createElementWithClass("div", "network-close-butt on", "dt-close-button");
81 this._closeButtonElement.addEventListener("click", this._showRequest.bind(th is, null), false); 81 this._closeButtonElement.addEventListener("click", this._showRequest.bind(th is, null), false);
82 82
83 this._networkLogShowOverviewSetting.addChangeListener(this._toggleShowOvervi ew, this); 83 this._networkLogShowOverviewSetting.addChangeListener(this._toggleShowOvervi ew, this);
84 this._networkLogLargeRowsSetting.addChangeListener(this._toggleLargerRequest s, this); 84 this._networkLogLargeRowsSetting.addChangeListener(this._toggleLargerRequest s, this);
85 this._networkRecordFilmStripSetting.addChangeListener(this._toggleRecordFilm Strip, this); 85 this._networkRecordFilmStripSetting.addChangeListener(this._toggleRecordFilm Strip, this);
86 86
87 this._toggleRecordButton(true); 87 this._toggleRecordButton(true);
88 this._toggleShowOverview(); 88 this._toggleShowOverview();
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 _toggleLargerRequests: function() 224 _toggleLargerRequests: function()
225 { 225 {
226 this._updateUI(); 226 this._updateUI();
227 }, 227 },
228 228
229 _toggleShowOverview: function() 229 _toggleShowOverview: function()
230 { 230 {
231 var toggled = this._networkLogShowOverviewSetting.get(); 231 var toggled = this._networkLogShowOverviewSetting.get();
232 if (toggled) 232 if (toggled)
233 this._overview.show(this._searchableView.element, this._splitView.el ement); 233 this._overview.show(this._searchableView.element, this._splitWidget. element);
234 else 234 else
235 this._overview.detach(); 235 this._overview.detach();
236 }, 236 },
237 237
238 _toggleRecordFilmStrip: function() 238 _toggleRecordFilmStrip: function()
239 { 239 {
240 var toggled = this._networkRecordFilmStripSetting.get(); 240 var toggled = this._networkRecordFilmStripSetting.get();
241 if (toggled && !this._filmStripRecorder) { 241 if (toggled && !this._filmStripRecorder) {
242 this._filmStripView = new WebInspector.FilmStripView(); 242 this._filmStripView = new WebInspector.FilmStripView();
243 this._filmStripView.element.classList.add("network-film-strip"); 243 this._filmStripView.element.classList.add("network-film-strip");
(...skipping 13 matching lines...) Expand all
257 * @return {boolean} 257 * @return {boolean}
258 */ 258 */
259 _isDetailsPaneAtBottom: function() 259 _isDetailsPaneAtBottom: function()
260 { 260 {
261 return WebInspector.moduleSetting("splitVerticallyWhenDockedToRight").ge t() && WebInspector.dockController.isVertical(); 261 return WebInspector.moduleSetting("splitVerticallyWhenDockedToRight").ge t() && WebInspector.dockController.isVertical();
262 }, 262 },
263 263
264 _dockSideChanged: function() 264 _dockSideChanged: function()
265 { 265 {
266 var detailsViewAtBottom = this._isDetailsPaneAtBottom(); 266 var detailsViewAtBottom = this._isDetailsPaneAtBottom();
267 this._splitView.setVertical(!detailsViewAtBottom); 267 this._splitWidget.setVertical(!detailsViewAtBottom);
268 this._updateUI(); 268 this._updateUI();
269 }, 269 },
270 270
271 /** 271 /**
272 * @param {!WebInspector.Event} event 272 * @param {!WebInspector.Event} event
273 */ 273 */
274 _onFiltersToggled: function(event) 274 _onFiltersToggled: function(event)
275 { 275 {
276 var toggled = /** @type {boolean} */ (event.data); 276 var toggled = /** @type {boolean} */ (event.data);
277 this._filtersContainer.classList.toggle("hidden", !toggled); 277 this._filtersContainer.classList.toggle("hidden", !toggled);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 _showRequest: function(request) 367 _showRequest: function(request)
368 { 368 {
369 if (this._networkItemView) { 369 if (this._networkItemView) {
370 this._networkItemView.detach(); 370 this._networkItemView.detach();
371 this._networkItemView = null; 371 this._networkItemView = null;
372 } 372 }
373 373
374 if (request) { 374 if (request) {
375 this._networkItemView = new WebInspector.NetworkItemView(request, th is._networkLogView.timeCalculator()); 375 this._networkItemView = new WebInspector.NetworkItemView(request, th is._networkLogView.timeCalculator());
376 this._networkItemView.insertBeforeTabStrip(this._closeButtonElement) ; 376 this._networkItemView.insertBeforeTabStrip(this._closeButtonElement) ;
377 this._networkItemView.show(this._detailsView.element); 377 this._networkItemView.show(this._detailsWidget.element);
378 this._splitView.showBoth(); 378 this._splitWidget.showBoth();
379 this._networkLogView.revealSelectedItem(); 379 this._networkLogView.revealSelectedItem();
380 } else { 380 } else {
381 this._splitView.hideMain(); 381 this._splitWidget.hideMain();
382 this._networkLogView.clearSelection(); 382 this._networkLogView.clearSelection();
383 } 383 }
384 this._updateUI(); 384 this._updateUI();
385 }, 385 },
386 386
387 _updateUI: function() 387 _updateUI: function()
388 { 388 {
389 var detailsPaneAtBottom = this._isDetailsPaneAtBottom(); 389 var detailsPaneAtBottom = this._isDetailsPaneAtBottom();
390 this._detailsView.element.classList.toggle("network-details-view-tall-he ader", this._networkLogLargeRowsSetting.get() && !detailsPaneAtBottom); 390 this._detailsWidget.element.classList.toggle("network-details-view-tall- header", this._networkLogLargeRowsSetting.get() && !detailsPaneAtBottom);
391 this._networkLogView.switchViewMode(!this._splitView.isResizable() || de tailsPaneAtBottom); 391 this._networkLogView.switchViewMode(!this._splitWidget.isResizable() || detailsPaneAtBottom);
392 }, 392 },
393 393
394 /** 394 /**
395 * @override 395 * @override
396 * @param {!WebInspector.SearchableView.SearchConfig} searchConfig 396 * @param {!WebInspector.SearchableView.SearchConfig} searchConfig
397 * @param {boolean} shouldJump 397 * @param {boolean} shouldJump
398 * @param {boolean=} jumpBackwards 398 * @param {boolean=} jumpBackwards
399 */ 399 */
400 performSearch: function(searchConfig, shouldJump, jumpBackwards) 400 performSearch: function(searchConfig, shouldJump, jumpBackwards)
401 { 401 {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 stopRecording: function(zeroTime) 660 stopRecording: function(zeroTime)
661 { 661 {
662 if (!this._target) 662 if (!this._target)
663 return; 663 return;
664 664
665 this._target.tracingManager.stop(); 665 this._target.tracingManager.stop();
666 this._target = null; 666 this._target = null;
667 this._zeroTime = zeroTime; 667 this._zeroTime = zeroTime;
668 } 668 }
669 } 669 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/network/NetworkItemView.js ('k') | Source/devtools/front_end/network/RequestCookiesView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698