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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/help/Help.js

Issue 2733493002: DevTools: fix bug with persisting drawer selection (Closed)
Patch Set: fix Created 3 years, 9 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 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @return {!Help.ReleaseNote} 6 * @return {!Help.ReleaseNote}
7 */ 7 */
8 Help.latestReleaseNote = function() { 8 Help.latestReleaseNote = function() {
9 if (!Help._latestReleaseNote) { 9 if (!Help._latestReleaseNote) {
10 /** @type {!Help.ReleaseNote} */ 10 /** @type {!Help.ReleaseNote} */
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 * @param {number} browserVersion 49 * @param {number} browserVersion
50 */ 50 */
51 Help._showReleaseNoteIfNeeded = function(lastSeenVersion, browserVersion) { 51 Help._showReleaseNoteIfNeeded = function(lastSeenVersion, browserVersion) {
52 if (!Runtime.experiments.isEnabled('releaseNote')) 52 if (!Runtime.experiments.isEnabled('releaseNote'))
53 return; 53 return;
54 if (lastSeenVersion >= browserVersion) 54 if (lastSeenVersion >= browserVersion)
55 return; 55 return;
56 if (Help.latestReleaseNote().version !== browserVersion) 56 if (Help.latestReleaseNote().version !== browserVersion)
57 return; 57 return;
58 Help.releaseNoteVersionSetting().set(Help.browserVersion()); 58 Help.releaseNoteVersionSetting().set(Help.browserVersion());
59 UI.inspectorView.showPanel(Help._releaseNoteViewId); 59 UI.viewManager.showView(Help._releaseNoteViewId, true);
60 }; 60 };
61 61
62 /** 62 /**
63 * @return {number} 63 * @return {number}
64 */ 64 */
65 Help.browserVersion = function() { 65 Help.browserVersion = function() {
66 if (!Help._browserVersion) { 66 if (!Help._browserVersion) {
67 var chromeRegex = new RegExp('(?:^|\\W)Chrome/(\\d+)'); 67 var chromeRegex = new RegExp('(?:^|\\W)Chrome/(\\d+)');
68 var chromeMatch = navigator.userAgent.match(chromeRegex); 68 var chromeMatch = navigator.userAgent.match(chromeRegex);
69 /** @type {number} */ 69 /** @type {number} */
(...skipping 15 matching lines...) Expand all
85 Help.ReleaseNoteHighlightContent; 85 Help.ReleaseNoteHighlightContent;
86 86
87 /** @typedef {!{contents: !Array<!Help.ReleaseNoteHighlightContent>, featured: ( boolean | undefined)}} */ 87 /** @typedef {!{contents: !Array<!Help.ReleaseNoteHighlightContent>, featured: ( boolean | undefined)}} */
88 Help.ReleaseNoteHighlight; 88 Help.ReleaseNoteHighlight;
89 89
90 /** 90 /**
91 * @typedef {!{version: number, highlights: !Array<!Help.ReleaseNoteHighlight>, 91 * @typedef {!{version: number, highlights: !Array<!Help.ReleaseNoteHighlight>,
92 * link: string, image: !Help.ReleaseNoteImage}} 92 * link: string, image: !Help.ReleaseNoteImage}}
93 */ 93 */
94 Help.ReleaseNote; 94 Help.ReleaseNote;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698