OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
4 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2013 Samsung Electronics. 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 this._sidebarTree.appendChild(this.applicationCacheListTreeElement); | 67 this._sidebarTree.appendChild(this.applicationCacheListTreeElement); |
68 | 68 |
69 this.cacheStorageListTreeElement = new WebInspector.ServiceWorkerCacheTreeEl
ement(this); | 69 this.cacheStorageListTreeElement = new WebInspector.ServiceWorkerCacheTreeEl
ement(this); |
70 this._sidebarTree.appendChild(this.cacheStorageListTreeElement); | 70 this._sidebarTree.appendChild(this.cacheStorageListTreeElement); |
71 | 71 |
72 if (Runtime.experiments.isEnabled("fileSystemInspection")) { | 72 if (Runtime.experiments.isEnabled("fileSystemInspection")) { |
73 this.fileSystemListTreeElement = new WebInspector.FileSystemListTreeElem
ent(this); | 73 this.fileSystemListTreeElement = new WebInspector.FileSystemListTreeElem
ent(this); |
74 this._sidebarTree.appendChild(this.fileSystemListTreeElement); | 74 this._sidebarTree.appendChild(this.fileSystemListTreeElement); |
75 } | 75 } |
76 | 76 |
77 var mainView = new WebInspector.VBox(); | 77 var mainContainer = new WebInspector.VBox(); |
78 this.storageViews = mainView.element.createChild("div", "vbox flex-auto"); | 78 this.storageViews = mainContainer.element.createChild("div", "vbox flex-auto
"); |
79 this._storageViewToolbar = new WebInspector.Toolbar(mainView.element); | 79 this._storageViewToolbar = new WebInspector.Toolbar(mainContainer.element); |
80 this._storageViewToolbar.element.classList.add("resources-toolbar"); | 80 this._storageViewToolbar.element.classList.add("resources-toolbar"); |
81 this.splitView().setMainView(mainView); | 81 this.splitWidget().setMainWidget(mainContainer); |
82 | 82 |
83 /** @type {!Map.<!WebInspector.Database, !Object.<string, !WebInspector.Data
baseTableView>>} */ | 83 /** @type {!Map.<!WebInspector.Database, !Object.<string, !WebInspector.Data
baseTableView>>} */ |
84 this._databaseTableViews = new Map(); | 84 this._databaseTableViews = new Map(); |
85 /** @type {!Map.<!WebInspector.Database, !WebInspector.DatabaseQueryView>} *
/ | 85 /** @type {!Map.<!WebInspector.Database, !WebInspector.DatabaseQueryView>} *
/ |
86 this._databaseQueryViews = new Map(); | 86 this._databaseQueryViews = new Map(); |
87 /** @type {!Map.<!WebInspector.Database, !WebInspector.DatabaseTreeElement>}
*/ | 87 /** @type {!Map.<!WebInspector.Database, !WebInspector.DatabaseTreeElement>}
*/ |
88 this._databaseTreeElements = new Map(); | 88 this._databaseTreeElements = new Map(); |
89 /** @type {!Map.<!WebInspector.DOMStorage, !WebInspector.DOMStorageItemsView
>} */ | 89 /** @type {!Map.<!WebInspector.DOMStorage, !WebInspector.DOMStorageItemsView
>} */ |
90 this._domStorageViews = new Map(); | 90 this._domStorageViews = new Map(); |
91 /** @type {!Map.<!WebInspector.DOMStorage, !WebInspector.DOMStorageTreeEleme
nt>} */ | 91 /** @type {!Map.<!WebInspector.DOMStorage, !WebInspector.DOMStorageTreeEleme
nt>} */ |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 var view = this._resourceViewForResource(resource); | 466 var view = this._resourceViewForResource(resource); |
467 if (!view) { | 467 if (!view) { |
468 this.visibleView.detach(); | 468 this.visibleView.detach(); |
469 return; | 469 return; |
470 } | 470 } |
471 this._innerShowView(view); | 471 this._innerShowView(view); |
472 }, | 472 }, |
473 | 473 |
474 /** | 474 /** |
475 * @param {!WebInspector.Resource} resource | 475 * @param {!WebInspector.Resource} resource |
476 * @return {?WebInspector.View} | 476 * @return {?WebInspector.Widget} |
477 */ | 477 */ |
478 _resourceViewForResource: function(resource) | 478 _resourceViewForResource: function(resource) |
479 { | 479 { |
480 if (resource.hasTextContent()) { | 480 if (resource.hasTextContent()) { |
481 var treeElement = this._findTreeElementForResource(resource); | 481 var treeElement = this._findTreeElementForResource(resource); |
482 if (!treeElement) | 482 if (!treeElement) |
483 return null; | 483 return null; |
484 return treeElement.sourceView(); | 484 return treeElement.sourceView(); |
485 } | 485 } |
486 | 486 |
487 switch (resource.resourceType()) { | 487 switch (resource.resourceType()) { |
488 case WebInspector.resourceTypes.Image: | 488 case WebInspector.resourceTypes.Image: |
489 return new WebInspector.ImageView(resource.url, resource.mimeType, r
esource); | 489 return new WebInspector.ImageView(resource.url, resource.mimeType, r
esource); |
490 case WebInspector.resourceTypes.Font: | 490 case WebInspector.resourceTypes.Font: |
491 return new WebInspector.FontView(resource.url, resource.mimeType, re
source); | 491 return new WebInspector.FontView(resource.url, resource.mimeType, re
source); |
492 default: | 492 default: |
493 return new WebInspector.EmptyView(resource.url); | 493 return new WebInspector.EmptyWidget(resource.url); |
494 } | 494 } |
495 }, | 495 }, |
496 | 496 |
497 /** | 497 /** |
498 * @param {!WebInspector.Resource} resource | 498 * @param {!WebInspector.Resource} resource |
499 * @return {?WebInspector.ResourceSourceFrame} | 499 * @return {?WebInspector.ResourceSourceFrame} |
500 */ | 500 */ |
501 _resourceSourceFrameViewForResource: function(resource) | 501 _resourceSourceFrameViewForResource: function(resource) |
502 { | 502 { |
503 var resourceView = this._resourceViewForResource(resource); | 503 var resourceView = this._resourceViewForResource(resource); |
(...skipping 29 matching lines...) Expand all Loading... |
533 view = new WebInspector.DatabaseQueryView(database); | 533 view = new WebInspector.DatabaseQueryView(database); |
534 this._databaseQueryViews.set(database, view); | 534 this._databaseQueryViews.set(database, view); |
535 view.addEventListener(WebInspector.DatabaseQueryView.Events.Sche
maUpdated, this._updateDatabaseTables, this); | 535 view.addEventListener(WebInspector.DatabaseQueryView.Events.Sche
maUpdated, this._updateDatabaseTables, this); |
536 } | 536 } |
537 } | 537 } |
538 | 538 |
539 this._innerShowView(view); | 539 this._innerShowView(view); |
540 }, | 540 }, |
541 | 541 |
542 /** | 542 /** |
543 * @param {!WebInspector.View} view | 543 * @param {!WebInspector.Widget} view |
544 */ | 544 */ |
545 showIndexedDB: function(view) | 545 showIndexedDB: function(view) |
546 { | 546 { |
547 this._innerShowView(view); | 547 this._innerShowView(view); |
548 }, | 548 }, |
549 | 549 |
550 /** | 550 /** |
551 * @param {!WebInspector.View} view | 551 * @param {!WebInspector.Widget} view |
552 */ | 552 */ |
553 showServiceWorkerCache: function(view) | 553 showServiceWorkerCache: function(view) |
554 { | 554 { |
555 this._innerShowView(view); | 555 this._innerShowView(view); |
556 }, | 556 }, |
557 | 557 |
558 /** | 558 /** |
559 * @param {!WebInspector.View} view | 559 * @param {!WebInspector.Widget} view |
560 */ | 560 */ |
561 showServiceWorkersView: function(view) | 561 showServiceWorkersView: function(view) |
562 { | 562 { |
563 this._innerShowView(view); | 563 this._innerShowView(view); |
564 }, | 564 }, |
565 | 565 |
566 /** | 566 /** |
567 * @param {!WebInspector.DOMStorage} domStorage | 567 * @param {!WebInspector.DOMStorage} domStorage |
568 */ | 568 */ |
569 _showDOMStorage: function(domStorage) | 569 _showDOMStorage: function(domStorage) |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 | 606 |
607 showApplicationCache: function(frameId) | 607 showApplicationCache: function(frameId) |
608 { | 608 { |
609 if (!this._applicationCacheViews[frameId]) | 609 if (!this._applicationCacheViews[frameId]) |
610 this._applicationCacheViews[frameId] = new WebInspector.ApplicationC
acheItemsView(this._applicationCacheModel, frameId); | 610 this._applicationCacheViews[frameId] = new WebInspector.ApplicationC
acheItemsView(this._applicationCacheModel, frameId); |
611 | 611 |
612 this._innerShowView(this._applicationCacheViews[frameId]); | 612 this._innerShowView(this._applicationCacheViews[frameId]); |
613 }, | 613 }, |
614 | 614 |
615 /** | 615 /** |
616 * @param {!WebInspector.View} view | 616 * @param {!WebInspector.Widget} view |
617 */ | 617 */ |
618 showFileSystem: function(view) | 618 showFileSystem: function(view) |
619 { | 619 { |
620 this._innerShowView(view); | 620 this._innerShowView(view); |
621 }, | 621 }, |
622 | 622 |
623 showCategoryView: function(categoryName) | 623 showCategoryView: function(categoryName) |
624 { | 624 { |
625 if (!this._categoryView) | 625 if (!this._categoryView) |
626 this._categoryView = new WebInspector.StorageCategoryView(); | 626 this._categoryView = new WebInspector.StorageCategoryView(); |
(...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2361 | 2361 |
2362 /** | 2362 /** |
2363 * @constructor | 2363 * @constructor |
2364 * @extends {WebInspector.VBox} | 2364 * @extends {WebInspector.VBox} |
2365 */ | 2365 */ |
2366 WebInspector.StorageCategoryView = function() | 2366 WebInspector.StorageCategoryView = function() |
2367 { | 2367 { |
2368 WebInspector.VBox.call(this); | 2368 WebInspector.VBox.call(this); |
2369 | 2369 |
2370 this.element.classList.add("storage-view"); | 2370 this.element.classList.add("storage-view"); |
2371 this._emptyView = new WebInspector.EmptyView(""); | 2371 this._emptyWidget = new WebInspector.EmptyWidget(""); |
2372 this._emptyView.show(this.element); | 2372 this._emptyWidget.show(this.element); |
2373 } | 2373 } |
2374 | 2374 |
2375 WebInspector.StorageCategoryView.prototype = { | 2375 WebInspector.StorageCategoryView.prototype = { |
2376 /** | 2376 /** |
2377 * @return {!Array.<!WebInspector.ToolbarItem>} | 2377 * @return {!Array.<!WebInspector.ToolbarItem>} |
2378 */ | 2378 */ |
2379 toolbarItems: function() | 2379 toolbarItems: function() |
2380 { | 2380 { |
2381 return []; | 2381 return []; |
2382 }, | 2382 }, |
2383 | 2383 |
2384 setText: function(text) | 2384 setText: function(text) |
2385 { | 2385 { |
2386 this._emptyView.text = text; | 2386 this._emptyWidget.text = text; |
2387 }, | 2387 }, |
2388 | 2388 |
2389 __proto__: WebInspector.VBox.prototype | 2389 __proto__: WebInspector.VBox.prototype |
2390 } | 2390 } |
2391 | 2391 |
2392 WebInspector.ResourcesPanel.show = function() | 2392 WebInspector.ResourcesPanel.show = function() |
2393 { | 2393 { |
2394 WebInspector.inspectorView.setCurrentPanel(WebInspector.ResourcesPanel._inst
ance()); | 2394 WebInspector.inspectorView.setCurrentPanel(WebInspector.ResourcesPanel._inst
ance()); |
2395 } | 2395 } |
2396 | 2396 |
(...skipping 18 matching lines...) Expand all Loading... |
2415 WebInspector.ResourcesPanelFactory.prototype = { | 2415 WebInspector.ResourcesPanelFactory.prototype = { |
2416 /** | 2416 /** |
2417 * @override | 2417 * @override |
2418 * @return {!WebInspector.Panel} | 2418 * @return {!WebInspector.Panel} |
2419 */ | 2419 */ |
2420 createPanel: function() | 2420 createPanel: function() |
2421 { | 2421 { |
2422 return WebInspector.ResourcesPanel._instance(); | 2422 return WebInspector.ResourcesPanel._instance(); |
2423 } | 2423 } |
2424 } | 2424 } |
OLD | NEW |