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

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

Issue 8356028: Add shortcut to show avatar menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build error Created 9 years, 2 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
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 { GDK_h, IDC_SHOW_HISTORY, GDK_CONTROL_MASK }, 166 { GDK_h, IDC_SHOW_HISTORY, GDK_CONTROL_MASK },
167 { GDK_j, IDC_SHOW_DOWNLOADS, GDK_CONTROL_MASK }, 167 { GDK_j, IDC_SHOW_DOWNLOADS, GDK_CONTROL_MASK },
168 { GDK_F1, IDC_HELP_PAGE, GdkModifierType(0) }, 168 { GDK_F1, IDC_HELP_PAGE, GdkModifierType(0) },
169 { XF86XK_AddFavorite, IDC_BOOKMARK_PAGE, GdkModifierType(0) }, 169 { XF86XK_AddFavorite, IDC_BOOKMARK_PAGE, GdkModifierType(0) },
170 { XF86XK_Favorites, IDC_SHOW_BOOKMARK_BAR, GdkModifierType(0) }, 170 { XF86XK_Favorites, IDC_SHOW_BOOKMARK_BAR, GdkModifierType(0) },
171 { XF86XK_History, IDC_SHOW_HISTORY, GdkModifierType(0) }, 171 { XF86XK_History, IDC_SHOW_HISTORY, GdkModifierType(0) },
172 { GDK_q, IDC_EXIT, GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, 172 { GDK_q, IDC_EXIT, GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) },
173 { GDK_s, IDC_SAVE_PAGE, GDK_CONTROL_MASK }, 173 { GDK_s, IDC_SAVE_PAGE, GDK_CONTROL_MASK },
174 { GDK_e, IDC_SHOW_APP_MENU, GDK_MOD1_MASK }, 174 { GDK_e, IDC_SHOW_APP_MENU, GDK_MOD1_MASK },
175 { GDK_f, IDC_SHOW_APP_MENU, GDK_MOD1_MASK }, 175 { GDK_f, IDC_SHOW_APP_MENU, GDK_MOD1_MASK },
176 { GDK_m, IDC_SHOW_AVATAR_MENU,
177 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK)},
176 { GDK_greater, IDC_TOGGLE_SPEECH_INPUT, 178 { GDK_greater, IDC_TOGGLE_SPEECH_INPUT,
177 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) }, 179 GdkModifierType(GDK_CONTROL_MASK | GDK_SHIFT_MASK) },
178 }; 180 };
179 181
180 } // namespace 182 } // namespace
181 183
182 // static 184 // static
183 AcceleratorsGtk* AcceleratorsGtk::GetInstance() { 185 AcceleratorsGtk* AcceleratorsGtk::GetInstance() {
184 return Singleton<AcceleratorsGtk>::get(); 186 return Singleton<AcceleratorsGtk>::get();
185 } 187 }
(...skipping 11 matching lines...) Expand all
197 all_accelerators_.push_back(std::make_pair(entry.command_id, accelerator)); 199 all_accelerators_.push_back(std::make_pair(entry.command_id, accelerator));
198 200
199 if (primary_accelerators_.find(entry.command_id) == 201 if (primary_accelerators_.find(entry.command_id) ==
200 primary_accelerators_.end()) { 202 primary_accelerators_.end()) {
201 primary_accelerators_[entry.command_id] = accelerator; 203 primary_accelerators_[entry.command_id] = accelerator;
202 } 204 }
203 } 205 }
204 } 206 }
205 207
206 AcceleratorsGtk::~AcceleratorsGtk() {} 208 AcceleratorsGtk::~AcceleratorsGtk() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/gtk/avatar_menu_button_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698