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

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

Issue 4710001: Split out command IDs from chrome_dll_resource.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/gtk/accelerators_gtk.h" 5 #include "chrome/browser/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
11 #include "chrome/app/chrome_dll_resource.h" 11 #include "chrome/app/chrome_command_ids.h"
12 12
13 namespace { 13 namespace {
14 14
15 // A mostly complete list of chrome's accelerators. When one command has 15 // A mostly complete list of chrome's accelerators. When one command has
16 // multiple shortcuts, the first one in this list is considered "primary", 16 // multiple shortcuts, the first one in this list is considered "primary",
17 // meaning that it will be displayed in context menus. 17 // meaning that it will be displayed in context menus.
18 const struct AcceleratorMapping { 18 const struct AcceleratorMapping {
19 guint keyval; 19 guint keyval;
20 int command_id; 20 int command_id;
21 GdkModifierType modifier_type; 21 GdkModifierType modifier_type;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 const menus::AcceleratorGtk* AcceleratorsGtk::GetPrimaryAcceleratorForCommand( 193 const menus::AcceleratorGtk* AcceleratorsGtk::GetPrimaryAcceleratorForCommand(
194 int command_id) { 194 int command_id) {
195 base::hash_map<int, menus::AcceleratorGtk>::const_iterator iter = 195 base::hash_map<int, menus::AcceleratorGtk>::const_iterator iter =
196 primary_accelerators_.find(command_id); 196 primary_accelerators_.find(command_id);
197 197
198 if (iter == primary_accelerators_.end()) 198 if (iter == primary_accelerators_.end())
199 return NULL; 199 return NULL;
200 200
201 return &iter->second; 201 return &iter->second;
202 } 202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698