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/ui/cocoa/extensions/extension_keybinding_registry_cocoa
.h" | 5 #include "chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa
.h" |
6 | 6 |
7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
8 #include "chrome/browser/extensions/api/commands/command_service.h" | 8 #include "chrome/browser/extensions/api/commands/command_service.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/common/extensions/extension.h" | 11 #include "chrome/common/extensions/extension.h" |
12 #include "chrome/common/extensions/extension_manifest_constants.h" | |
13 #include "content/public/browser/native_web_keyboard_event.h" | 12 #include "content/public/browser/native_web_keyboard_event.h" |
14 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
| 14 #include "extensions/common/manifest_constants.h" |
15 | 15 |
16 namespace values = extension_manifest_values; | 16 namespace values = extensions::manifest_values; |
17 | 17 |
18 // static | 18 // static |
19 void extensions::ExtensionKeybindingRegistry::SetShortcutHandlingSuspended( | 19 void extensions::ExtensionKeybindingRegistry::SetShortcutHandlingSuspended( |
20 bool suspended) { | 20 bool suspended) { |
21 ExtensionKeybindingRegistryCocoa::set_shortcut_handling_suspended(suspended); | 21 ExtensionKeybindingRegistryCocoa::set_shortcut_handling_suspended(suspended); |
22 } | 22 } |
23 | 23 |
24 bool ExtensionKeybindingRegistryCocoa::shortcut_handling_suspended_ = false; | 24 bool ExtensionKeybindingRegistryCocoa::shortcut_handling_suspended_ = false; |
25 | 25 |
26 ExtensionKeybindingRegistryCocoa::ExtensionKeybindingRegistryCocoa( | 26 ExtensionKeybindingRegistryCocoa::ExtensionKeybindingRegistryCocoa( |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 const extensions::Extension* extension, | 139 const extensions::Extension* extension, |
140 const std::string& command_name) { | 140 const std::string& command_name) { |
141 EventTargets::iterator iter = event_targets_.begin(); | 141 EventTargets::iterator iter = event_targets_.begin(); |
142 while (iter != event_targets_.end()) { | 142 while (iter != event_targets_.end()) { |
143 EventTargets::iterator old = iter++; | 143 EventTargets::iterator old = iter++; |
144 if (old->second.first == extension->id() && | 144 if (old->second.first == extension->id() && |
145 (command_name.empty() || (old->second.second == command_name))) | 145 (command_name.empty() || (old->second.second == command_name))) |
146 event_targets_.erase(old); | 146 event_targets_.erase(old); |
147 } | 147 } |
148 } | 148 } |
OLD | NEW |