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

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

Issue 1908363002: Nuke chrome.embeddedeseach.newTabPage.navigateContentWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
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
« no previous file with comments | « chrome/browser/resources/local_ntp/most_visited_util.js ('k') | chrome/browser/search/instant_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698