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

Side by Side Diff: ui/webui/resources/js/cr/link_controller.js

Issue 1150173003: Fix some JS style nits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 7 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
« no previous file with comments | « ui/webui/resources/js/cr.js ('k') | ui/webui/resources/js/cr/ui/array_data_model.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * @fileoverview This file provides a class that can be used to open URLs based 6 * @fileoverview This file provides a class that can be used to open URLs based
7 * on user interactions. It ensures a consistent behavior when it comes to 7 * on user interactions. It ensures a consistent behavior when it comes to
8 * holding down Ctrl and Shift while clicking or activating the a link. 8 * holding down Ctrl and Shift while clicking or activating the a link.
9 * 9 *
10 * This depends on the {@code chrome.windows} and {@code chrome.tabs} 10 * This depends on the {@code chrome.windows} and {@code chrome.tabs}
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 * Opens a URL in a new tab, window or incognito window. 101 * Opens a URL in a new tab, window or incognito window.
102 * @param {string} url The URL to open. 102 * @param {string} url The URL to open.
103 * @param {cr.LinkKind} kind The kind of open we want to do. 103 * @param {cr.LinkKind} kind The kind of open we want to do.
104 */ 104 */
105 openUrl: function(url, kind) { 105 openUrl: function(url, kind) {
106 this.openUrls([url], kind); 106 this.openUrls([url], kind);
107 }, 107 },
108 108
109 /** 109 /**
110 * Opens URLs in new tab, window or incognito mode. 110 * Opens URLs in new tab, window or incognito mode.
111 * @param {!Array.<string>} urls The URLs to open. 111 * @param {!Array<string>} urls The URLs to open.
112 * @param {cr.LinkKind} kind The kind of open we want to do. 112 * @param {cr.LinkKind} kind The kind of open we want to do.
113 */ 113 */
114 openUrls: function(urls, kind) { 114 openUrls: function(urls, kind) {
115 if (urls.length < 1) 115 if (urls.length < 1)
116 return; 116 return;
117 117
118 if (urls.length > this.warningLimit) { 118 if (urls.length > this.warningLimit) {
119 if (!this.window.confirm(this.getWarningMessage(urls.length))) 119 if (!this.window.confirm(this.getWarningMessage(urls.length)))
120 return; 120 return;
121 } 121 }
(...skipping 23 matching lines...) Expand all
145 this.window.location.href = urls[0]; 145 this.window.location.href = urls[0];
146 } 146 }
147 } 147 }
148 }; 148 };
149 149
150 // Export 150 // Export
151 return { 151 return {
152 LinkController: LinkController, 152 LinkController: LinkController,
153 }; 153 };
154 }); 154 });
OLDNEW
« no previous file with comments | « ui/webui/resources/js/cr.js ('k') | ui/webui/resources/js/cr/ui/array_data_model.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698