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

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

Issue 2141753002: [Extensions] Code cleanup - const &s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_COMMAND_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_COMMAND_H_
6 #define CHROME_COMMON_EXTENSIONS_COMMAND_H_ 6 #define CHROME_COMMON_EXTENSIONS_COMMAND_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 int index, 54 int index,
55 base::string16* error); 55 base::string16* error);
56 56
57 // Accessors: 57 // Accessors:
58 const std::string& command_name() const { return command_name_; } 58 const std::string& command_name() const { return command_name_; }
59 const ui::Accelerator& accelerator() const { return accelerator_; } 59 const ui::Accelerator& accelerator() const { return accelerator_; }
60 const base::string16& description() const { return description_; } 60 const base::string16& description() const { return description_; }
61 bool global() const { return global_; } 61 bool global() const { return global_; }
62 62
63 // Setter: 63 // Setter:
64 void set_accelerator(ui::Accelerator accelerator) { 64 void set_accelerator(const ui::Accelerator& accelerator) {
65 accelerator_ = accelerator; 65 accelerator_ = accelerator;
66 } 66 }
67 void set_global(bool global) { 67 void set_global(bool global) {
68 global_ = global; 68 global_ = global;
69 } 69 }
70 70
71 private: 71 private:
72 std::string command_name_; 72 std::string command_name_;
73 ui::Accelerator accelerator_; 73 ui::Accelerator accelerator_;
74 base::string16 description_; 74 base::string16 description_;
75 bool global_; 75 bool global_;
76 }; 76 };
77 77
78 // A mapping of command name (std::string) to a command object. 78 // A mapping of command name (std::string) to a command object.
79 typedef std::map<std::string, Command> CommandMap; 79 typedef std::map<std::string, Command> CommandMap;
80 80
81 } // namespace extensions 81 } // namespace extensions
82 82
83 #endif // CHROME_COMMON_EXTENSIONS_COMMAND_H_ 83 #endif // CHROME_COMMON_EXTENSIONS_COMMAND_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/chrome_manifest_url_handlers.cc ('k') | chrome/common/extensions/command_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698