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

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

Issue 10317014: Move Command class out of the Extension class and into its own location (under chrome/common/exten… (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
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/extension_commands.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_COMMANDS_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_COMMANDS_H_
7 #pragma once
8
9 #include <string>
10 #include <map>
11
12 #include "base/string16.h"
13 #include "ui/base/accelerators/accelerator.h"
14
15 namespace base {
16 class DictionaryValue;
17 }
18
19 namespace extensions {
20
21 class Command {
22 public:
23 // Define out of line constructor/destructor to please Clang.
24 Command();
25 ~Command();
26
27 // The platform value for the Command.
28 static std::string CommandPlatform();
29
30 // Parse the command.
31 bool Parse(base::DictionaryValue* command,
32 const std::string& command_name,
33 int index,
34 string16* error);
35
36 // Accessors:
37 const std::string& command_name() const { return command_name_; }
38 const ui::Accelerator& accelerator() const { return accelerator_; }
39 const std::string& description() const { return description_; }
40
41 private:
42 ui::Accelerator ParseImpl(const std::string& shortcut,
43 const std::string& platform_key,
44 int index,
45 string16* error);
46 std::string command_name_;
47 ui::Accelerator accelerator_;
48 std::string description_;
49 };
50
51 // A mapping of command name (std::string) to a command object.
52 typedef std::map<std::string, Command> CommandMap;
53
54 }
Jói 2012/05/04 13:26:40 I think our coding standard says this should shoul
55
56 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_COMMANDS_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/extension_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698