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

Side by Side Diff: Source/devtools/front_end/ui/HelpScreen.js

Issue 714423005: DevTools: move front-end files from components to ui. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comment addressed Created 6 years, 1 month 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 19 matching lines...) Expand all
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @param {string=} title 33 * @param {string=} title
34 * @extends {WebInspector.VBox} 34 * @extends {WebInspector.VBox}
35 */ 35 */
36 WebInspector.HelpScreen = function(title) 36 WebInspector.HelpScreen = function(title)
37 { 37 {
38 WebInspector.VBox.call(this); 38 WebInspector.VBox.call(this);
39 this.markAsRoot(); 39 this.markAsRoot();
40 this.registerRequiredCSS("components/helpScreen.css"); 40 this.registerRequiredCSS("ui/helpScreen.css");
41 41
42 this.element.classList.add("help-window-outer"); 42 this.element.classList.add("help-window-outer");
43 this.element.addEventListener("keydown", this._onKeyDown.bind(this), false); 43 this.element.addEventListener("keydown", this._onKeyDown.bind(this), false);
44 this.element.tabIndex = 0; 44 this.element.tabIndex = 0;
45 45
46 if (title) { 46 if (title) {
47 var mainWindow = this.element.createChild("div", "help-window-main"); 47 var mainWindow = this.element.createChild("div", "help-window-main");
48 var captionWindow = mainWindow.createChild("div", "help-window-caption") ; 48 var captionWindow = mainWindow.createChild("div", "help-window-caption") ;
49 captionWindow.appendChild(this._createCloseButton()); 49 captionWindow.appendChild(this._createCloseButton());
50 this.helpContentElement = mainWindow.createChild("div", "help-content"); 50 this.helpContentElement = mainWindow.createChild("div", "help-content");
(...skipping 18 matching lines...) Expand all
69 showModal: function() 69 showModal: function()
70 { 70 {
71 var visibleHelpScreen = WebInspector.HelpScreen._visibleScreen; 71 var visibleHelpScreen = WebInspector.HelpScreen._visibleScreen;
72 if (visibleHelpScreen === this) 72 if (visibleHelpScreen === this)
73 return; 73 return;
74 74
75 if (visibleHelpScreen) 75 if (visibleHelpScreen)
76 visibleHelpScreen.hide(); 76 visibleHelpScreen.hide();
77 WebInspector.HelpScreen._visibleScreen = this; 77 WebInspector.HelpScreen._visibleScreen = this;
78 WebInspector.GlassPane.DefaultFocusedViewStack.push(this); 78 WebInspector.GlassPane.DefaultFocusedViewStack.push(this);
79 this.show(WebInspector.inspectorView.element); 79 this.show(WebInspector.Dialog.modalHostView().element);
80 this.focus(); 80 this.focus();
81 }, 81 },
82 82
83 hide: function() 83 hide: function()
84 { 84 {
85 if (!this.isShowing()) 85 if (!this.isShowing())
86 return; 86 return;
87 87
88 WebInspector.HelpScreen._visibleScreen = null; 88 WebInspector.HelpScreen._visibleScreen = null;
89 WebInspector.GlassPane.DefaultFocusedViewStack.pop(); 89 WebInspector.GlassPane.DefaultFocusedViewStack.pop();
(...skipping 18 matching lines...) Expand all
108 _onKeyDown: function(event) 108 _onKeyDown: function(event)
109 { 109 {
110 if (this.isShowing() && this.isClosingKey(event.keyCode)) { 110 if (this.isShowing() && this.isClosingKey(event.keyCode)) {
111 this.hide(); 111 this.hide();
112 event.consume(); 112 event.consume();
113 } 113 }
114 }, 114 },
115 115
116 __proto__: WebInspector.VBox.prototype 116 __proto__: WebInspector.VBox.prototype
117 } 117 }
118
119 /**
120 * @constructor
121 * @extends {WebInspector.HelpScreen}
122 */
123 WebInspector.RemoteDebuggingTerminatedScreen = function(reason)
124 {
125 WebInspector.HelpScreen.call(this, WebInspector.UIString("Detached from the target"));
126 var p = this.helpContentElement.createChild("p");
127 p.classList.add("help-section");
128 p.createChild("span").textContent = WebInspector.UIString("Remote debugging has been terminated with reason: ");
129 p.createChild("span", "error-message").textContent = reason;
130 p.createChild("br");
131 p.createChild("span").textContent = WebInspector.UIString("Please re-attach to the new target.");
132 }
133
134 WebInspector.RemoteDebuggingTerminatedScreen.prototype = {
135 __proto__: WebInspector.HelpScreen.prototype
136 }
137
138 /**
139 * @constructor
140 * @extends {WebInspector.HelpScreen}
141 */
142 WebInspector.WorkerTerminatedScreen = function()
143 {
144 WebInspector.HelpScreen.call(this, WebInspector.UIString("Inspected worker t erminated"));
145 var p = this.helpContentElement.createChild("p");
146 p.classList.add("help-section");
147 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once it restarts we will attach to it automatically.");
148 }
149
150 WebInspector.WorkerTerminatedScreen.prototype = {
151
152 __proto__: WebInspector.HelpScreen.prototype
153 }
154
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ui/FlameChart.js ('k') | Source/devtools/front_end/ui/OverviewGrid.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698