| 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/extension_keybinding_registry.h" |   8 #include "chrome/browser/extensions/extension_keybinding_registry.h" | 
|   9 #include "chrome/browser/profiles/profile.h" |   9 #include "chrome/browser/profiles/profile.h" | 
|  10 #include "chrome/browser/ui/extensions/accelerator_priority.h" |  10 #include "chrome/browser/ui/extensions/accelerator_priority.h" | 
|  11 #include "extensions/common/extension.h" |  11 #include "extensions/common/extension.h" | 
|  12 #include "ui/views/focus/focus_manager.h" |  12 #include "ui/views/focus/focus_manager.h" | 
|  13  |  13  | 
 |  14 #if !defined(OS_MACOSX) | 
|  14 // static |  15 // static | 
|  15 void extensions::ExtensionKeybindingRegistry::SetShortcutHandlingSuspended( |  16 void extensions::ExtensionKeybindingRegistry::SetShortcutHandlingSuspended( | 
|  16     bool suspended) { |  17     bool suspended) { | 
|  17   views::FocusManager::set_shortcut_handling_suspended(suspended); |  18   views::FocusManager::set_shortcut_handling_suspended(suspended); | 
|  18 } |  19 } | 
 |  20 #endif | 
|  19  |  21  | 
|  20 ExtensionKeybindingRegistryViews::ExtensionKeybindingRegistryViews( |  22 ExtensionKeybindingRegistryViews::ExtensionKeybindingRegistryViews( | 
|  21     Profile* profile, |  23     Profile* profile, | 
|  22     views::FocusManager* focus_manager, |  24     views::FocusManager* focus_manager, | 
|  23     ExtensionFilter extension_filter, |  25     ExtensionFilter extension_filter, | 
|  24     Delegate* delegate) |  26     Delegate* delegate) | 
|  25     : ExtensionKeybindingRegistry(profile, extension_filter, delegate), |  27     : ExtensionKeybindingRegistry(profile, extension_filter, delegate), | 
|  26       profile_(profile), |  28       profile_(profile), | 
|  27       focus_manager_(focus_manager) { |  29       focus_manager_(focus_manager) { | 
|  28   Init(); |  30   Init(); | 
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  78       GetAcceleratorPriorityById(accelerator, extension_id, browser_context()); |  80       GetAcceleratorPriorityById(accelerator, extension_id, browser_context()); | 
|  79   // Normal priority shortcuts must be handled via standard browser commands to |  81   // Normal priority shortcuts must be handled via standard browser commands to | 
|  80   // be processed at the proper time. |  82   // be processed at the proper time. | 
|  81   return (priority == ui::AcceleratorManager::kHighPriority) && |  83   return (priority == ui::AcceleratorManager::kHighPriority) && | 
|  82       ExtensionKeybindingRegistry::NotifyEventTargets(accelerator); |  84       ExtensionKeybindingRegistry::NotifyEventTargets(accelerator); | 
|  83 } |  85 } | 
|  84  |  86  | 
|  85 bool ExtensionKeybindingRegistryViews::CanHandleAccelerators() const { |  87 bool ExtensionKeybindingRegistryViews::CanHandleAccelerators() const { | 
|  86   return true; |  88   return true; | 
|  87 } |  89 } | 
| OLD | NEW |