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

Side by Side Diff: chrome/common/extensions/extension_commands.h

Issue 10383240: This adds a webui overlay on the extensions page for showing what Extension keybindings are active.… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
Aaron Boodman 2012/05/19 05:33:26 Nit: This file could be called 'commands.h' for mo
Finnur 2012/05/21 21:28:43 Sure. OK for followup changelist? On 2012/05/19 0
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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_COMMANDS_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_COMMANDS_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_COMMANDS_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_COMMANDS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <map> 10 #include <map>
11 11
(...skipping 17 matching lines...) Expand all
29 29
30 // Parse the command. 30 // Parse the command.
31 bool Parse(base::DictionaryValue* command, 31 bool Parse(base::DictionaryValue* command,
32 const std::string& command_name, 32 const std::string& command_name,
33 int index, 33 int index,
34 string16* error); 34 string16* error);
35 35
36 // Accessors: 36 // Accessors:
37 const std::string& command_name() const { return command_name_; } 37 const std::string& command_name() const { return command_name_; }
38 const ui::Accelerator& accelerator() const { return accelerator_; } 38 const ui::Accelerator& accelerator() const { return accelerator_; }
39 const std::string& description() const { return description_; } 39 const string16& description() const { return description_; }
40 40
41 private: 41 private:
42 ui::Accelerator ParseImpl(const std::string& shortcut, 42 ui::Accelerator ParseImpl(const std::string& shortcut,
43 const std::string& platform_key, 43 const std::string& platform_key,
44 int index, 44 int index,
45 string16* error); 45 string16* error);
46 std::string command_name_; 46 std::string command_name_;
47 ui::Accelerator accelerator_; 47 ui::Accelerator accelerator_;
48 std::string description_; 48 string16 description_;
49 }; 49 };
50 50
51 // A mapping of command name (std::string) to a command object. 51 // A mapping of command name (std::string) to a command object.
52 typedef std::map<std::string, Command> CommandMap; 52 typedef std::map<std::string, Command> CommandMap;
53 53
54 } // namespace extensions 54 } // namespace extensions
55 55
56 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_COMMANDS_H_ 56 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_COMMANDS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698