| 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/extension_keybinding_registry.h" | 5 #include "chrome/browser/extensions/extension_keybinding_registry.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/common/chrome_notification_types.h" | 8 #include "chrome/common/chrome_notification_types.h" |
| 9 #include "chrome/common/extensions/extension_manifest_constants.h" | 9 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 10 #include "chrome/common/extensions/extension_set.h" | 10 #include "chrome/common/extensions/extension_set.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 command == extension_manifest_values::kBrowserActionKeybindingEvent; | 40 command == extension_manifest_values::kBrowserActionKeybindingEvent; |
| 41 } | 41 } |
| 42 | 42 |
| 43 void ExtensionKeybindingRegistry::Observe( | 43 void ExtensionKeybindingRegistry::Observe( |
| 44 int type, | 44 int type, |
| 45 const content::NotificationSource& source, | 45 const content::NotificationSource& source, |
| 46 const content::NotificationDetails& details) { | 46 const content::NotificationDetails& details) { |
| 47 switch (type) { | 47 switch (type) { |
| 48 case chrome::NOTIFICATION_EXTENSION_LOADED: | 48 case chrome::NOTIFICATION_EXTENSION_LOADED: |
| 49 AddExtensionKeybinding( | 49 AddExtensionKeybinding( |
| 50 content::Details<const Extension>(details).ptr()); | 50 content::Details<const extensions::Extension>(details).ptr()); |
| 51 break; | 51 break; |
| 52 case chrome::NOTIFICATION_EXTENSION_UNLOADED: | 52 case chrome::NOTIFICATION_EXTENSION_UNLOADED: |
| 53 RemoveExtensionKeybinding( | 53 RemoveExtensionKeybinding( |
| 54 content::Details<UnloadedExtensionInfo>(details)->extension); | 54 content::Details<UnloadedExtensionInfo>(details)->extension); |
| 55 break; | 55 break; |
| 56 default: | 56 default: |
| 57 NOTREACHED(); | 57 NOTREACHED(); |
| 58 break; | 58 break; |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace extensions | 62 } // namespace extensions |
| OLD | NEW |