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/browser/extensions/api/commands/command_service.h" | 5 #include "chrome/browser/extensions/api/commands/command_service.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/extensions/api/commands/commands.h" | 10 #include "chrome/browser/extensions/api/commands/commands.h" |
11 #include "chrome/browser/extensions/extension_function_registry.h" | 11 #include "chrome/browser/extensions/extension_function_registry.h" |
12 #include "chrome/browser/extensions/extension_keybinding_registry.h" | 12 #include "chrome/browser/extensions/extension_keybinding_registry.h" |
13 #include "chrome/browser/extensions/extension_service.h" | 13 #include "chrome/browser/extensions/extension_service.h" |
14 #include "chrome/browser/extensions/extension_system.h" | 14 #include "chrome/browser/extensions/extension_system.h" |
15 #include "chrome/browser/prefs/pref_registry_syncable.h" | |
16 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 15 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
17 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/common/chrome_notification_types.h" | 17 #include "chrome/common/chrome_notification_types.h" |
19 #include "chrome/common/extensions/api/commands/commands_handler.h" | 18 #include "chrome/common/extensions/api/commands/commands_handler.h" |
20 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| 20 #include "components/user_prefs/pref_registry_syncable.h" |
21 #include "content/public/browser/notification_details.h" | 21 #include "content/public/browser/notification_details.h" |
22 #include "content/public/browser/notification_service.h" | 22 #include "content/public/browser/notification_service.h" |
23 | 23 |
24 using extensions::Extension; | 24 using extensions::Extension; |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const char kExtension[] = "extension"; | 28 const char kExtension[] = "extension"; |
29 const char kCommandName[] = "command_name"; | 29 const char kCommandName[] = "command_name"; |
30 | 30 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 return false; | 356 return false; |
357 | 357 |
358 *command = *requested_command; | 358 *command = *requested_command; |
359 if (shortcut_assigned.key_code() != ui::VKEY_UNKNOWN) | 359 if (shortcut_assigned.key_code() != ui::VKEY_UNKNOWN) |
360 command->set_accelerator(shortcut_assigned); | 360 command->set_accelerator(shortcut_assigned); |
361 | 361 |
362 return true; | 362 return true; |
363 } | 363 } |
364 | 364 |
365 } // namespace extensions | 365 } // namespace extensions |
OLD | NEW |