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/views/extensions/extension_keybinding_registry_views
.h" | 5 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views
.h" |
6 | 6 |
7 #include "chrome/browser/extensions/api/commands/command_service.h" | 7 #include "chrome/browser/extensions/api/commands/command_service.h" |
8 #include "chrome/browser/extensions/api/commands/command_service_factory.h" | 8 #include "chrome/browser/extensions/api/commands/command_service_factory.h" |
9 #include "chrome/browser/extensions/extension_browser_event_router.h" | 9 #include "chrome/browser/extensions/extension_browser_event_router.h" |
| 10 #include "chrome/browser/extensions/extension_keybinding_registry.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
13 #include "ui/views/focus/focus_manager.h" | 14 #include "ui/views/focus/focus_manager.h" |
14 | 15 |
| 16 // static |
| 17 void extensions::ExtensionKeybindingRegistry::SetShortcutHandlingSuspended( |
| 18 bool suspended) { |
| 19 views::FocusManager::set_shortcut_handling_suspended(suspended); |
| 20 } |
| 21 |
15 ExtensionKeybindingRegistryViews::ExtensionKeybindingRegistryViews( | 22 ExtensionKeybindingRegistryViews::ExtensionKeybindingRegistryViews( |
16 Profile* profile, views::FocusManager* focus_manager) | 23 Profile* profile, views::FocusManager* focus_manager) |
17 : ExtensionKeybindingRegistry(profile), | 24 : ExtensionKeybindingRegistry(profile), |
18 profile_(profile), | 25 profile_(profile), |
19 focus_manager_(focus_manager) { | 26 focus_manager_(focus_manager) { |
20 Init(); | 27 Init(); |
21 } | 28 } |
22 | 29 |
23 ExtensionKeybindingRegistryViews::~ExtensionKeybindingRegistryViews() { | 30 ExtensionKeybindingRegistryViews::~ExtensionKeybindingRegistryViews() { |
24 EventTargets::const_iterator iter; | 31 EventTargets::const_iterator iter; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 80 |
74 service->browser_event_router()->CommandExecuted( | 81 service->browser_event_router()->CommandExecuted( |
75 profile_, it->second.first, it->second.second); | 82 profile_, it->second.first, it->second.second); |
76 | 83 |
77 return true; | 84 return true; |
78 } | 85 } |
79 | 86 |
80 bool ExtensionKeybindingRegistryViews::CanHandleAccelerators() const { | 87 bool ExtensionKeybindingRegistryViews::CanHandleAccelerators() const { |
81 return true; | 88 return true; |
82 } | 89 } |
OLD | NEW |