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

Side by Side Diff: Source/devtools/front_end/components/InspectorView.js

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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) 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 this._drawerSplitView.hideSidebar(); 44 this._drawerSplitView.hideSidebar();
45 this._drawerSplitView.enableShowModeSaving(); 45 this._drawerSplitView.enableShowModeSaving();
46 this._drawerSplitView.show(this.element); 46 this._drawerSplitView.show(this.element);
47 47
48 this._tabbedPane = new WebInspector.TabbedPane(); 48 this._tabbedPane = new WebInspector.TabbedPane();
49 this._tabbedPane.setRetainTabOrder(true); 49 this._tabbedPane.setRetainTabOrder(true);
50 this._tabbedPane.show(this._drawerSplitView.mainElement()); 50 this._tabbedPane.show(this._drawerSplitView.mainElement());
51 this._drawer = new WebInspector.Drawer(this._drawerSplitView); 51 this._drawer = new WebInspector.Drawer(this._drawerSplitView);
52 52
53 // Patch tabbed pane header with toolbar actions. 53 // Patch tabbed pane header with toolbar actions.
54 this._toolbarElement = document.createElement("div"); 54 this._toolbarElement = createElement("div");
55 this._toolbarElement.className = "toolbar toolbar-background toolbar-colors" ; 55 this._toolbarElement.className = "toolbar toolbar-background toolbar-colors" ;
56 var headerElement = this._tabbedPane.headerElement(); 56 var headerElement = this._tabbedPane.headerElement();
57 headerElement.parentElement.insertBefore(this._toolbarElement, headerElement ); 57 headerElement.parentElement.insertBefore(this._toolbarElement, headerElement );
58 58
59 this._leftToolbarElement = this._toolbarElement.createChild("div", "toolbar- controls-left"); 59 this._leftToolbarElement = this._toolbarElement.createChild("div", "toolbar- controls-left");
60 this._toolbarElement.appendChild(headerElement); 60 this._toolbarElement.appendChild(headerElement);
61 this._rightToolbarElement = this._toolbarElement.createChild("div", "toolbar -controls-right"); 61 this._rightToolbarElement = this._toolbarElement.createChild("div", "toolbar -controls-right");
62 this._toolbarItems = []; 62 this._toolbarItems = [];
63 63
64 this._closeButtonToolbarItem = document.createElementWithClass("div", "toolb ar-close-button-item"); 64 this._closeButtonToolbarItem = createElementWithClass("div", "toolbar-close- button-item");
65 var closeButtonElement = this._closeButtonToolbarItem.createChild("div", "cl ose-button"); 65 var closeButtonElement = this._closeButtonToolbarItem.createChild("div", "cl ose-button");
66 closeButtonElement.addEventListener("click", InspectorFrontendHost.closeWind ow.bind(InspectorFrontendHost), true); 66 closeButtonElement.addEventListener("click", InspectorFrontendHost.closeWind ow.bind(InspectorFrontendHost), true);
67 this._rightToolbarElement.appendChild(this._closeButtonToolbarItem); 67 this._rightToolbarElement.appendChild(this._closeButtonToolbarItem);
68 68
69 this._panels = {}; 69 this._panels = {};
70 // Used by tests. 70 // Used by tests.
71 WebInspector["panels"] = this._panels; 71 WebInspector["panels"] = this._panels;
72 72
73 this._history = []; 73 this._history = [];
74 this._historyIterator = -1; 74 this._historyIterator = -1;
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 531
532 WebInspector.InspectorView.ToggleDrawerButtonProvider.prototype = { 532 WebInspector.InspectorView.ToggleDrawerButtonProvider.prototype = {
533 /** 533 /**
534 * @return {?WebInspector.StatusBarItem} 534 * @return {?WebInspector.StatusBarItem}
535 */ 535 */
536 item: function() 536 item: function()
537 { 537 {
538 return WebInspector.inspectorView._drawer.toggleButton(); 538 return WebInspector.inspectorView._drawer.toggleButton();
539 } 539 }
540 } 540 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698