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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: test fixed Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Joseph Pecoraro 2 * Copyright (C) 2009 Joseph Pecoraro
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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 this.element.classList.add("console-view-wrapper"); 82 this.element.classList.add("console-view-wrapper");
83 83
84 WebInspector.ConsolePanel.WrapperView._instance = this; 84 WebInspector.ConsolePanel.WrapperView._instance = this;
85 85
86 this._view = WebInspector.ConsoleView.instance(); 86 this._view = WebInspector.ConsoleView.instance();
87 } 87 }
88 88
89 WebInspector.ConsolePanel.WrapperView.prototype = { 89 WebInspector.ConsolePanel.WrapperView.prototype = {
90 wasShown: function() 90 wasShown: function()
91 { 91 {
92 if (!WebInspector.inspectorView.currentPanel() || WebInspector.inspector View.currentPanel().name !== "console") 92 if (!WebInspector.ConsolePanel.instance().isShowing())
93 this._showViewInWrapper(); 93 this._showViewInWrapper();
94 else 94 else
95 WebInspector.inspectorView.setDrawerMinimized(true); 95 WebInspector.inspectorView.setDrawerMinimized(true);
96 }, 96 },
97 97
98 willHide: function() 98 willHide: function()
99 { 99 {
100 WebInspector.inspectorView.setDrawerMinimized(false); 100 WebInspector.inspectorView.setDrawerMinimized(false);
101 }, 101 },
102 102
(...skipping 19 matching lines...) Expand all
122 * @param {!Object} object 122 * @param {!Object} object
123 * @return {!Promise} 123 * @return {!Promise}
124 */ 124 */
125 reveal: function(object) 125 reveal: function(object)
126 { 126 {
127 var consoleView = WebInspector.ConsoleView.instance(); 127 var consoleView = WebInspector.ConsoleView.instance();
128 if (consoleView.isShowing()) { 128 if (consoleView.isShowing()) {
129 consoleView.focus(); 129 consoleView.focus();
130 return Promise.resolve(); 130 return Promise.resolve();
131 } 131 }
132 WebInspector.viewManager.showView("console"); 132 WebInspector.viewManager.showView("console-view");
133 return Promise.resolve(); 133 return Promise.resolve();
134 } 134 }
135 } 135 }
136 136
137 /**
138 * @return {!Promise}
139 */
137 WebInspector.ConsolePanel.show = function() 140 WebInspector.ConsolePanel.show = function()
dgozman 2016/10/12 04:47:40 Let's maybe remove this one? I didn't find non-tes
pfeldman 2016/10/12 19:02:33 Done.
138 { 141 {
139 WebInspector.inspectorView.setCurrentPanel(WebInspector.ConsolePanel._instan ce()); 142 return WebInspector.viewManager.showView("console");
140 } 143 }
141 144
142 /** 145 /**
143 * @return {!WebInspector.ConsolePanel} 146 * @return {!WebInspector.ConsolePanel}
144 */ 147 */
145 WebInspector.ConsolePanel._instance = function() 148 WebInspector.ConsolePanel.instance = function()
146 { 149 {
147 return /** @type {!WebInspector.ConsolePanel} */ (self.runtime.sharedInstanc e(WebInspector.ConsolePanel)); 150 return /** @type {!WebInspector.ConsolePanel} */ (self.runtime.sharedInstanc e(WebInspector.ConsolePanel));
148 } 151 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698