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

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

Issue 2377193004: [DevTools] Rework some focus code. (Closed)
Patch Set: 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 29 matching lines...) Expand all
40 /** 40 /**
41 * @override 41 * @override
42 */ 42 */
43 wasShown: function() 43 wasShown: function()
44 { 44 {
45 WebInspector.Panel.prototype.wasShown.call(this); 45 WebInspector.Panel.prototype.wasShown.call(this);
46 var wrapper = WebInspector.ConsolePanel.WrapperView._instance; 46 var wrapper = WebInspector.ConsolePanel.WrapperView._instance;
47 if (wrapper && wrapper.isShowing()) 47 if (wrapper && wrapper.isShowing())
48 WebInspector.inspectorView.setDrawerMinimized(true); 48 WebInspector.inspectorView.setDrawerMinimized(true);
49 this._view.show(this.element); 49 this._view.show(this.element);
50 this._view.focus();
50 }, 51 },
51 52
52 /** 53 /**
53 * @override 54 * @override
54 */ 55 */
55 willHide: function() 56 willHide: function()
56 { 57 {
57 WebInspector.Panel.prototype.willHide.call(this); 58 WebInspector.Panel.prototype.willHide.call(this);
58 if (WebInspector.ConsolePanel.WrapperView._instance) 59 if (WebInspector.ConsolePanel.WrapperView._instance)
59 WebInspector.ConsolePanel.WrapperView._instance._showViewInWrapper() ; 60 WebInspector.ConsolePanel.WrapperView._instance._showViewInWrapper() ;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 WebInspector.inspectorView.setCurrentPanel(WebInspector.ConsolePanel._instan ce()); 140 WebInspector.inspectorView.setCurrentPanel(WebInspector.ConsolePanel._instan ce());
140 } 141 }
141 142
142 /** 143 /**
143 * @return {!WebInspector.ConsolePanel} 144 * @return {!WebInspector.ConsolePanel}
144 */ 145 */
145 WebInspector.ConsolePanel._instance = function() 146 WebInspector.ConsolePanel._instance = function()
146 { 147 {
147 return /** @type {!WebInspector.ConsolePanel} */ (self.runtime.sharedInstanc e(WebInspector.ConsolePanel)); 148 return /** @type {!WebInspector.ConsolePanel} */ (self.runtime.sharedInstanc e(WebInspector.ConsolePanel));
148 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698