| OLD | NEW |
| 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 #include "chrome/common/extensions/command.h" | 5 #include "chrome/common/extensions/command.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 const std::string& accelerator, | 287 const std::string& accelerator, |
| 288 bool global) | 288 bool global) |
| 289 : command_name_(command_name), | 289 : command_name_(command_name), |
| 290 description_(description), | 290 description_(description), |
| 291 global_(global) { | 291 global_(global) { |
| 292 base::string16 error; | 292 base::string16 error; |
| 293 accelerator_ = ParseImpl(accelerator, CommandPlatform(), 0, | 293 accelerator_ = ParseImpl(accelerator, CommandPlatform(), 0, |
| 294 IsNamedCommand(command_name), &error); | 294 IsNamedCommand(command_name), &error); |
| 295 } | 295 } |
| 296 | 296 |
| 297 Command::Command(const Command& other) = default; |
| 298 |
| 297 Command::~Command() {} | 299 Command::~Command() {} |
| 298 | 300 |
| 299 // static | 301 // static |
| 300 std::string Command::CommandPlatform() { | 302 std::string Command::CommandPlatform() { |
| 301 #if defined(OS_WIN) | 303 #if defined(OS_WIN) |
| 302 return values::kKeybindingPlatformWin; | 304 return values::kKeybindingPlatformWin; |
| 303 #elif defined(OS_MACOSX) | 305 #elif defined(OS_MACOSX) |
| 304 return values::kKeybindingPlatformMac; | 306 return values::kKeybindingPlatformMac; |
| 305 #elif defined(OS_CHROMEOS) | 307 #elif defined(OS_CHROMEOS) |
| 306 return values::kKeybindingPlatformChromeOs; | 308 return values::kKeybindingPlatformChromeOs; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 accelerator_ = accelerator; | 551 accelerator_ = accelerator; |
| 550 command_name_ = command_name; | 552 command_name_ = command_name; |
| 551 description_ = description; | 553 description_ = description; |
| 552 global_ = global; | 554 global_ = global; |
| 553 } | 555 } |
| 554 } | 556 } |
| 555 return true; | 557 return true; |
| 556 } | 558 } |
| 557 | 559 |
| 558 } // namespace extensions | 560 } // namespace extensions |
| OLD | NEW |