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

Side by Side Diff: chrome/browser/ui/gtk/accelerators_gtk.cc

Issue 7108017: Added Ctrl+Shift+w keyboard shortcut to close a window. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 6 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 | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/ui/gtk/accelerators_gtk.h" 5 #include "chrome/browser/ui/gtk/accelerators_gtk.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #include <X11/XF86keysym.h> 9 #include <X11/XF86keysym.h>
10 10
(...skipping 28 matching lines...) Expand all
39 { GDK_Page_Up, IDC_MOVE_TAB_PREVIOUS, 39 { GDK_Page_Up, IDC_MOVE_TAB_PREVIOUS,
40 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, 40 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) },
41 { GDK_Page_Up, IDC_SELECT_PREVIOUS_TAB, GDK_CONTROL_MASK }, 41 { GDK_Page_Up, IDC_SELECT_PREVIOUS_TAB, GDK_CONTROL_MASK },
42 { GDK_w, IDC_CLOSE_TAB, GDK_CONTROL_MASK }, 42 { GDK_w, IDC_CLOSE_TAB, GDK_CONTROL_MASK },
43 { GDK_t, IDC_RESTORE_TAB, 43 { GDK_t, IDC_RESTORE_TAB,
44 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, 44 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) },
45 { GDK_t, IDC_NEW_TAB, GDK_CONTROL_MASK }, 45 { GDK_t, IDC_NEW_TAB, GDK_CONTROL_MASK },
46 { GDK_n, IDC_NEW_WINDOW, GDK_CONTROL_MASK }, 46 { GDK_n, IDC_NEW_WINDOW, GDK_CONTROL_MASK },
47 { GDK_n, IDC_NEW_INCOGNITO_WINDOW, 47 { GDK_n, IDC_NEW_INCOGNITO_WINDOW,
48 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, 48 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) },
49 { GDK_w, IDC_CLOSE_WINDOW,
50 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) },
49 51
50 { GDK_1, IDC_SELECT_TAB_0, GDK_CONTROL_MASK }, 52 { GDK_1, IDC_SELECT_TAB_0, GDK_CONTROL_MASK },
51 { GDK_2, IDC_SELECT_TAB_1, GDK_CONTROL_MASK }, 53 { GDK_2, IDC_SELECT_TAB_1, GDK_CONTROL_MASK },
52 { GDK_3, IDC_SELECT_TAB_2, GDK_CONTROL_MASK }, 54 { GDK_3, IDC_SELECT_TAB_2, GDK_CONTROL_MASK },
53 { GDK_4, IDC_SELECT_TAB_3, GDK_CONTROL_MASK }, 55 { GDK_4, IDC_SELECT_TAB_3, GDK_CONTROL_MASK },
54 { GDK_5, IDC_SELECT_TAB_4, GDK_CONTROL_MASK }, 56 { GDK_5, IDC_SELECT_TAB_4, GDK_CONTROL_MASK },
55 { GDK_6, IDC_SELECT_TAB_5, GDK_CONTROL_MASK }, 57 { GDK_6, IDC_SELECT_TAB_5, GDK_CONTROL_MASK },
56 { GDK_7, IDC_SELECT_TAB_6, GDK_CONTROL_MASK }, 58 { GDK_7, IDC_SELECT_TAB_6, GDK_CONTROL_MASK },
57 { GDK_8, IDC_SELECT_TAB_7, GDK_CONTROL_MASK }, 59 { GDK_8, IDC_SELECT_TAB_7, GDK_CONTROL_MASK },
58 { GDK_9, IDC_SELECT_LAST_TAB, GDK_CONTROL_MASK }, 60 { GDK_9, IDC_SELECT_LAST_TAB, GDK_CONTROL_MASK },
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 const ui::AcceleratorGtk* AcceleratorsGtk::GetPrimaryAcceleratorForCommand( 202 const ui::AcceleratorGtk* AcceleratorsGtk::GetPrimaryAcceleratorForCommand(
201 int command_id) { 203 int command_id) {
202 base::hash_map<int, ui::AcceleratorGtk>::const_iterator iter = 204 base::hash_map<int, ui::AcceleratorGtk>::const_iterator iter =
203 primary_accelerators_.find(command_id); 205 primary_accelerators_.find(command_id);
204 206
205 if (iter == primary_accelerators_.end()) 207 if (iter == primary_accelerators_.end())
206 return NULL; 208 return NULL;
207 209
208 return &iter->second; 210 return &iter->second;
209 } 211 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698