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

Side by Side Diff: chrome/browser/disposition_utils.cc

Issue 6538100: Move core pieces of chrome\browser. I've only gone up to "g", will do the re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: take out extra stuff from content_browser.gypi Created 9 years, 10 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
« no previous file with comments | « chrome/browser/disposition_utils.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 #include "chrome/browser/disposition_utils.h"
6
7 #include "build/build_config.h"
8
9 namespace disposition_utils {
10
11 WindowOpenDisposition DispositionFromClick(bool middle_button,
12 bool alt_key,
13 bool ctrl_key,
14 bool meta_key,
15 bool shift_key) {
16 // MacOS uses meta key (Command key) to spawn new tabs.
17 #if defined(OS_MACOSX)
18 if (middle_button || meta_key)
19 #else
20 if (middle_button || ctrl_key)
21 #endif
22 return shift_key ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
23 if (shift_key)
24 return NEW_WINDOW;
25 if (alt_key)
26 return SAVE_TO_DISK;
27 return CURRENT_TAB;
28 }
29
30 }
OLDNEW
« no previous file with comments | « chrome/browser/disposition_utils.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698