OLD | NEW |
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 // Miscellany. | 154 // Miscellany. |
155 { GDK_d, IDC_BOOKMARK_ALL_TABS, | 155 { GDK_d, IDC_BOOKMARK_ALL_TABS, |
156 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, | 156 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, |
157 { GDK_d, IDC_BOOKMARK_PAGE, GDK_CONTROL_MASK }, | 157 { GDK_d, IDC_BOOKMARK_PAGE, GDK_CONTROL_MASK }, |
158 { GDK_o, IDC_OPEN_FILE, GDK_CONTROL_MASK }, | 158 { GDK_o, IDC_OPEN_FILE, GDK_CONTROL_MASK }, |
159 { GDK_f, IDC_FIND, GDK_CONTROL_MASK }, | 159 { GDK_f, IDC_FIND, GDK_CONTROL_MASK }, |
160 { GDK_p, IDC_PRINT, GDK_CONTROL_MASK }, | 160 { GDK_p, IDC_PRINT, GDK_CONTROL_MASK }, |
161 { GDK_b, IDC_SHOW_BOOKMARK_BAR, | 161 { GDK_b, IDC_SHOW_BOOKMARK_BAR, |
162 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, | 162 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, |
| 163 { GDK_o, IDC_SHOW_BOOKMARK_MANAGER, |
| 164 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, |
163 { GDK_F11, IDC_FULLSCREEN, GdkModifierType(0) }, | 165 { GDK_F11, IDC_FULLSCREEN, GdkModifierType(0) }, |
164 { GDK_Delete, IDC_CLEAR_BROWSING_DATA, | 166 { GDK_Delete, IDC_CLEAR_BROWSING_DATA, |
165 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, | 167 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, |
166 { GDK_h, IDC_SHOW_HISTORY, GDK_CONTROL_MASK }, | 168 { GDK_h, IDC_SHOW_HISTORY, GDK_CONTROL_MASK }, |
167 { GDK_j, IDC_SHOW_DOWNLOADS, GDK_CONTROL_MASK }, | 169 { GDK_j, IDC_SHOW_DOWNLOADS, GDK_CONTROL_MASK }, |
168 { GDK_F1, IDC_HELP_PAGE, GdkModifierType(0) }, | 170 { GDK_F1, IDC_HELP_PAGE, GdkModifierType(0) }, |
169 { XF86XK_AddFavorite, IDC_BOOKMARK_PAGE, GdkModifierType(0) }, | 171 { XF86XK_AddFavorite, IDC_BOOKMARK_PAGE, GdkModifierType(0) }, |
170 { XF86XK_Favorites, IDC_SHOW_BOOKMARK_BAR, GdkModifierType(0) }, | 172 { XF86XK_Favorites, IDC_SHOW_BOOKMARK_BAR, GdkModifierType(0) }, |
171 { XF86XK_History, IDC_SHOW_HISTORY, GdkModifierType(0) }, | 173 { XF86XK_History, IDC_SHOW_HISTORY, GdkModifierType(0) }, |
172 { GDK_q, IDC_EXIT, GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, | 174 { GDK_q, IDC_EXIT, GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, |
(...skipping 29 matching lines...) Expand all Loading... |
202 const ui::AcceleratorGtk* AcceleratorsGtk::GetPrimaryAcceleratorForCommand( | 204 const ui::AcceleratorGtk* AcceleratorsGtk::GetPrimaryAcceleratorForCommand( |
203 int command_id) { | 205 int command_id) { |
204 base::hash_map<int, ui::AcceleratorGtk>::const_iterator iter = | 206 base::hash_map<int, ui::AcceleratorGtk>::const_iterator iter = |
205 primary_accelerators_.find(command_id); | 207 primary_accelerators_.find(command_id); |
206 | 208 |
207 if (iter == primary_accelerators_.end()) | 209 if (iter == primary_accelerators_.end()) |
208 return NULL; | 210 return NULL; |
209 | 211 |
210 return &iter->second; | 212 return &iter->second; |
211 } | 213 } |
OLD | NEW |