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

Side by Side Diff: chrome/browser/resources/local_ntp/window_disposition_util.js

Issue 178253008: Redoing Issue 36073011: Allowing file:/// in Instant Extended's Most Visited links. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused consts. Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5
6 /**
7 * @fileoverview Utilities for handling window disposition.
8 */
9
10
11 /**
12 * The JavaScript button event value for a middle click.
13 * @type {number}
14 * @const
15 */
16 var MIDDLE_MOUSE_BUTTON = 1;
17
18
19 /**
20 * Gets the desired navigation behavior from a event. This function works both
21 * with mouse and keyboard events.
22 * @param {Event} e The event object.
23 * @return {WindowOpenDisposition} The desired navigation behavior.
24 */
25 function getDispositionFromEvent(e) {
26 var middleButton = e.button == MIDDLE_MOUSE_BUTTON;
27 return chrome.embeddedSearch.newTabPage.getDispositionFromClick(middleButton,
28 e.altKey,
29 e.ctrlKey,
30 e.metaKey,
31 e.shiftKey);
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698