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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/DockController.js

Issue 2573323002: Revert of [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: Created 4 years 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 22 matching lines...) Expand all
33 */ 33 */
34 Components.DockController = class extends Common.Object { 34 Components.DockController = class extends Common.Object {
35 /** 35 /**
36 * @param {boolean} canDock 36 * @param {boolean} canDock
37 */ 37 */
38 constructor(canDock) { 38 constructor(canDock) {
39 super(); 39 super();
40 this._canDock = canDock; 40 this._canDock = canDock;
41 41
42 this._closeButton = new UI.ToolbarButton(Common.UIString('Close'), 'largeico n-delete'); 42 this._closeButton = new UI.ToolbarButton(Common.UIString('Close'), 'largeico n-delete');
43 this._closeButton.addEventListener( 43 this._closeButton.addEventListener('click', InspectorFrontendHost.closeWindo w.bind(InspectorFrontendHost));
44 UI.ToolbarButton.Events.Click, InspectorFrontendHost.closeWindow.bind(In spectorFrontendHost));
45 44
46 if (!canDock) { 45 if (!canDock) {
47 this._dockSide = Components.DockController.State.Undocked; 46 this._dockSide = Components.DockController.State.Undocked;
48 this._updateUI(); 47 this._updateUI();
49 return; 48 return;
50 } 49 }
51 50
52 this._states = [ 51 this._states = [
53 Components.DockController.State.DockedToRight, Components.DockController.S tate.DockedToBottom, 52 Components.DockController.State.DockedToRight, Components.DockController.S tate.DockedToBottom,
54 Components.DockController.State.Undocked 53 Components.DockController.State.Undocked
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 */ 213 */
215 item() { 214 item() {
216 return Components.dockController._closeButton; 215 return Components.dockController._closeButton;
217 } 216 }
218 }; 217 };
219 218
220 /** 219 /**
221 * @type {!Components.DockController} 220 * @type {!Components.DockController}
222 */ 221 */
223 Components.dockController; 222 Components.dockController;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698