/external/chromium_org/athena/input/ |
D | accelerator_manager_impl.cc | 30 virtual void Register(const ui::Accelerator& accelerator, 32 virtual bool Process(const ui::Accelerator& accelerator) = 0; 55 const ui::Accelerator& accelerator) OVERRIDE { in ProcessAccelerator() argument 56 return accelerator_manager_->Process(accelerator) ? RESULT_PROCESSED in ProcessAccelerator() 74 const ui::Accelerator& accelerator, in ProcessAccelerator() argument 78 !accelerator_manager_->IsRegistered(accelerator, AF_RESERVED)) { in ProcessAccelerator() 82 return accelerator_manager_->Process(accelerator); in ProcessAccelerator() 95 virtual bool ProcessAccelerator(const ui::Accelerator& accelerator) OVERRIDE { in ProcessAccelerator() argument 96 return accelerator_manager_->Process(accelerator); in ProcessAccelerator() 100 const ui::Accelerator& accelerator) const OVERRIDE { in GetCurrentTargetForAccelerator() [all …]
|
/external/chromium_org/chrome/browser/extensions/ |
D | extension_keybinding_apitest.cc | 338 ui::Accelerator accelerator = command_service->FindCommandByName( in IN_PROC_BROWSER_TEST_F() local 339 kId, manifest_values::kBrowserActionCommandEvent).accelerator(); in IN_PROC_BROWSER_TEST_F() 340 EXPECT_EQ(ui::VKEY_UNKNOWN, accelerator.key_code()); in IN_PROC_BROWSER_TEST_F() 348 accelerator = command_service->FindCommandByName( in IN_PROC_BROWSER_TEST_F() 349 kId, manifest_values::kBrowserActionCommandEvent).accelerator(); in IN_PROC_BROWSER_TEST_F() 350 EXPECT_EQ(ui::VKEY_F, accelerator.key_code()); in IN_PROC_BROWSER_TEST_F() 351 EXPECT_FALSE(accelerator.IsCtrlDown()); in IN_PROC_BROWSER_TEST_F() 352 EXPECT_TRUE(accelerator.IsShiftDown()); in IN_PROC_BROWSER_TEST_F() 353 EXPECT_TRUE(accelerator.IsAltDown()); in IN_PROC_BROWSER_TEST_F() 383 ui::Accelerator accelerator = command_service->FindCommandByName( in IN_PROC_BROWSER_TEST_F() local [all …]
|
D | global_shortcut_listener_x11.cc | 33 int GetNativeModifiers(const ui::Accelerator& accelerator) { in GetNativeModifiers() argument 35 modifiers |= accelerator.IsShiftDown() ? ShiftMask : 0; in GetNativeModifiers() 36 modifiers |= accelerator.IsCtrlDown() ? ControlMask : 0; in GetNativeModifiers() 37 modifiers |= accelerator.IsAltDown() ? Mod1Mask : 0; in GetNativeModifiers() 100 const ui::Accelerator& accelerator) { in RegisterAcceleratorImpl() argument 101 DCHECK(registered_hot_keys_.find(accelerator) == registered_hot_keys_.end()); in RegisterAcceleratorImpl() 103 int modifiers = GetNativeModifiers(accelerator); in RegisterAcceleratorImpl() 105 XKeysymForWindowsKeyCode(accelerator.key_code(), false)); in RegisterAcceleratorImpl() 126 registered_hot_keys_.insert(accelerator); in RegisterAcceleratorImpl() 131 const ui::Accelerator& accelerator) { in UnregisterAcceleratorImpl() argument [all …]
|
D | global_shortcut_listener_win.cc | 61 ui::Accelerator accelerator( in OnWndProc() local 64 NotifyKeyPressed(accelerator); in OnWndProc() 68 const ui::Accelerator& accelerator) { in RegisterAcceleratorImpl() argument 69 DCHECK(hotkey_ids_.find(accelerator) == hotkey_ids_.end()); in RegisterAcceleratorImpl() 72 modifiers |= accelerator.IsShiftDown() ? MOD_SHIFT : 0; in RegisterAcceleratorImpl() 73 modifiers |= accelerator.IsCtrlDown() ? MOD_CONTROL : 0; in RegisterAcceleratorImpl() 74 modifiers |= accelerator.IsAltDown() ? MOD_ALT : 0; in RegisterAcceleratorImpl() 80 accelerator.key_code()); in RegisterAcceleratorImpl() 87 hotkey_ids_[accelerator] = hotkey_id++; in RegisterAcceleratorImpl() 92 const ui::Accelerator& accelerator) { in UnregisterAcceleratorImpl() argument [all …]
|
D | extension_commands_global_registry.cc | 83 const ui::Accelerator& accelerator = iter->second.accelerator(); in AddExtensionKeybinding() local 87 << " key: " << accelerator.GetShortcutText(); in AddExtensionKeybinding() 89 if (!IsAcceleratorRegistered(accelerator)) { in AddExtensionKeybinding() 91 accelerator, this)) in AddExtensionKeybinding() 95 AddEventTarget(accelerator, extension->id(), iter->second.command_name()); in AddExtensionKeybinding() 100 const ui::Accelerator& accelerator, in RemoveExtensionKeybindingImpl() argument 105 accelerator, this); in RemoveExtensionKeybindingImpl() 109 const ui::Accelerator& accelerator) { in OnKeyPressed() argument 110 ExtensionKeybindingRegistry::NotifyEventTargets(accelerator); in OnKeyPressed()
|
D | global_shortcut_listener.cc | 26 const ui::Accelerator& accelerator, Observer* observer) { in RegisterAccelerator() argument 31 AcceleratorMap::const_iterator it = accelerator_map_.find(accelerator); in RegisterAccelerator() 37 if (!RegisterAcceleratorImpl(accelerator)) { in RegisterAccelerator() 46 accelerator_map_[accelerator] = observer; in RegisterAccelerator() 51 const ui::Accelerator& accelerator, Observer* observer) { in UnregisterAccelerator() argument 56 AcceleratorMap::iterator it = accelerator_map_.find(accelerator); in UnregisterAccelerator() 62 UnregisterAcceleratorImpl(accelerator); in UnregisterAccelerator() 110 const ui::Accelerator& accelerator) { in NotifyKeyPressed() argument 111 AcceleratorMap::iterator iter = accelerator_map_.find(accelerator); in NotifyKeyPressed() 119 iter->second->OnKeyPressed(accelerator); in NotifyKeyPressed()
|
D | global_shortcut_listener_mac.mm | 14 #include "ui/base/accelerators/accelerator.h" 104 // Look up the accelerator based on this hot key ID. 105 const ui::Accelerator& accelerator = id_accelerators_[hot_key_id.id]; 106 NotifyKeyPressed(accelerator); 112 // Create an accelerator corresponding to the keyCode. 113 ui::Accelerator accelerator(key_code, 0); 115 if (accelerator_ids_.find(accelerator) != accelerator_ids_.end()) { 117 NotifyKeyPressed(accelerator); 124 const ui::Accelerator& accelerator) { 126 DCHECK(accelerator_ids_.find(accelerator) == accelerator_ids_.end()); [all …]
|
D | extension_keybinding_registry.cc | 93 const ui::Accelerator& accelerator) { in NotifyEventTargets() argument 94 return ExecuteCommands(accelerator, std::string()); in NotifyEventTargets() 126 const ui::Accelerator& accelerator) const { in IsAcceleratorRegistered() 127 return event_targets_.find(accelerator) != event_targets_.end(); in IsAcceleratorRegistered() 131 const ui::Accelerator& accelerator, in AddEventTarget() argument 134 event_targets_[accelerator].push_back( in AddEventTarget() 138 if (!extensions::Command::IsMediaKey(accelerator)) in AddEventTarget() 139 DCHECK_EQ(1u, event_targets_[accelerator].size()); in AddEventTarget() 143 const ui::Accelerator& accelerator, in GetFirstTarget() argument 146 EventTargets::const_iterator targets = event_targets_.find(accelerator); in GetFirstTarget() [all …]
|
D | global_shortcut_listener.h | 27 virtual void OnKeyPressed(const ui::Accelerator& accelerator) = 0; 42 bool RegisterAccelerator(const ui::Accelerator& accelerator, 47 void UnregisterAccelerator(const ui::Accelerator& accelerator, 67 void NotifyKeyPressed(const ui::Accelerator& accelerator); 82 virtual bool RegisterAcceleratorImpl(const ui::Accelerator& accelerator) = 0; 84 const ui::Accelerator& accelerator) = 0;
|
/external/chromium_org/ui/base/accelerators/ |
D | accelerator_manager.cc | 19 void AcceleratorManager::Register(const Accelerator& accelerator, in Register() argument 22 AcceleratorTargetList& targets = accelerators_[accelerator].second; in Register() 28 DCHECK(!accelerators_[accelerator].first) in Register() 32 accelerators_[accelerator].first = true; in Register() 39 if (!accelerators_[accelerator].first) in Register() 45 void AcceleratorManager::Unregister(const Accelerator& accelerator, in Unregister() argument 47 AcceleratorMap::iterator map_iter = accelerators_.find(accelerator); in Unregister() 62 if (accelerators_[accelerator].first && target_iter == targets->begin()) { in Unregister() 64 accelerators_[accelerator].first = false; in Unregister() 78 bool AcceleratorManager::Process(const Accelerator& accelerator) { in Process() argument [all …]
|
D | accelerator.cc | 38 Accelerator::Accelerator(const Accelerator& accelerator) { in Accelerator() argument 39 key_code_ = accelerator.key_code_; in Accelerator() 40 type_ = accelerator.type_; in Accelerator() 41 modifiers_ = accelerator.modifiers_; in Accelerator() 42 is_repeat_ = accelerator.is_repeat_; in Accelerator() 43 if (accelerator.platform_accelerator_.get()) in Accelerator() 44 platform_accelerator_ = accelerator.platform_accelerator_->CreateCopy(); in Accelerator() 50 Accelerator& Accelerator::operator=(const Accelerator& accelerator) { in operator =() argument 51 if (this != &accelerator) { in operator =() 52 key_code_ = accelerator.key_code_; in operator =() [all …]
|
D | accelerator_manager_unittest.cc | 31 virtual bool AcceleratorPressed(const Accelerator& accelerator) OVERRIDE; 40 bool TestTarget::AcceleratorPressed(const Accelerator& accelerator) { in AcceleratorPressed() argument 141 Accelerator accelerator(GetAccelerator(VKEY_A, mask)); in TEST_F() local 142 const base::string16 text = accelerator.GetShortcutText(); in TEST_F() 143 manager_.Register(accelerator, AcceleratorManager::kNormalPriority, in TEST_F() 148 EXPECT_TRUE(manager_.Process(accelerator)) << text; in TEST_F() 152 accelerator.set_type(ET_UNKNOWN); in TEST_F() 153 EXPECT_FALSE(manager_.Process(accelerator)) << text; // different type in TEST_F() 154 accelerator.set_type(ET_TRANSLATED_KEY_PRESS); in TEST_F() 155 EXPECT_FALSE(manager_.Process(accelerator)) << text; // different type in TEST_F() [all …]
|
/external/chromium_org/chrome/browser/ui/cocoa/ |
D | accelerator_utils_cocoa.mm | 9 #include "ui/base/accelerators/accelerator.h" 15 bool IsChromeAccelerator(const ui::Accelerator& accelerator, Profile* profile) { 16 // The |accelerator| passed in contains a Windows key code but no platform 17 // accelerator info. The Accelerator list is the opposite: It has accelerators 19 // accelerator. We find common ground by converting the passed in Windows key 24 ui::MacKeyCodeForWindowsKeyCode(accelerator.key_code(), 32 (accelerator.IsCtrlDown() ? NSControlKeyMask : 0) | 33 (accelerator.IsCmdDown() ? NSCommandKeyMask : 0) | 34 (accelerator.IsAltDown() ? NSAlternateKeyMask : 0) | 35 (accelerator.IsShiftDown() ? NSShiftKeyMask : 0); [all …]
|
D | accelerators_cocoa_browsertest.mm | 18 // Adds all NSMenuItems with an accelerator to the array. 57 // Checks that each NSMenuItem in the main menu has a corresponding accelerator, 68 const ui::Accelerator* accelerator; 71 // Check that the accelerator is present as an un-mapped accelerator. 73 accelerator = keymap->GetAcceleratorForHotKey( 76 EXPECT_TRUE(accelerator); 81 accelerator = keymap->GetAcceleratorForCommand(command_id); 82 EXPECT_TRUE(accelerator); 83 if (!accelerator) 86 // Get the Cocoa key_equivalent associated with the accelerator. [all …]
|
/external/chromium_org/ash/accelerators/ |
D | nested_accelerator_delegate.cc | 19 bool IsPossibleAcceleratorNotForMenu(const ui::Accelerator& accelerator) { in IsPossibleAcceleratorNotForMenu() argument 24 if (accelerator.type() == ui::ET_KEY_PRESSED && in IsPossibleAcceleratorNotForMenu() 25 (accelerator.modifiers() & (ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN))) { in IsPossibleAcceleratorNotForMenu() 26 const ui::KeyboardCode key_code = accelerator.key_code(); in IsPossibleAcceleratorNotForMenu() 36 bool ShouldProcessAcceleratorNow(const ui::Accelerator& accelerator) { in ShouldProcessAcceleratorNow() argument 37 if (!IsPossibleAcceleratorNotForMenu(accelerator)) in ShouldProcessAcceleratorNow() 57 const ui::Accelerator& accelerator) { in ProcessAccelerator() argument 58 if (!ShouldProcessAcceleratorNow(accelerator)) in ProcessAccelerator() 65 return accelerator_controller->Process(accelerator) ? RESULT_PROCESSED in ProcessAccelerator()
|
D | accelerator_controller.cc | 126 bool HandleCycleBackwardMRU(const ui::Accelerator& accelerator) { in HandleCycleBackwardMRU() argument 127 if (accelerator.key_code() == ui::VKEY_TAB) in HandleCycleBackwardMRU() 135 bool HandleCycleForwardMRU(const ui::Accelerator& accelerator) { in HandleCycleForwardMRU() argument 136 if (accelerator.key_code() == ui::VKEY_TAB) in HandleCycleForwardMRU() 144 bool ToggleOverview(const ui::Accelerator& accelerator) { in ToggleOverview() argument 276 const ui::Accelerator& accelerator) { in HandlePreviousIme() argument 279 return ime_control_delegate->HandlePreviousIme(accelerator); in HandlePreviousIme() 441 const ui::Accelerator& accelerator) { in HandleSwitchIme() argument 444 return ime_control_delegate->HandleSwitchIme(accelerator); in HandleSwitchIme() 472 const ui::Accelerator& accelerator) { in HandleToggleAppList() argument [all …]
|
D | accelerator_delegate.cc | 23 const ui::Accelerator& accelerator, in ProcessAccelerator() argument 32 Shell::GetInstance()->accelerator_controller()->Process(accelerator); in ProcessAccelerator() 35 if (!ShouldProcessAcceleratorNow(key_event, accelerator)) in ProcessAccelerator() 37 return Shell::GetInstance()->accelerator_controller()->Process(accelerator); in ProcessAccelerator() 53 const ui::Accelerator& accelerator) { in ShouldProcessAcceleratorNow() argument 81 accelerator); in ShouldProcessAcceleratorNow()
|
/external/chromium_org/chrome/common/extensions/ |
D | command.cc | 37 bool DoesRequireModifier(const std::string& accelerator) { in DoesRequireModifier() argument 38 return accelerator != values::kKeyMediaNextTrack && in DoesRequireModifier() 39 accelerator != values::kKeyMediaPlayPause && in DoesRequireModifier() 40 accelerator != values::kKeyMediaPrevTrack && in DoesRequireModifier() 41 accelerator != values::kKeyMediaStop; in DoesRequireModifier() 44 ui::Accelerator ParseImpl(const std::string& accelerator, in ParseImpl() argument 63 base::SplitString(accelerator, '+', &tokens); in ParseImpl() 65 (tokens.size() == 1 && DoesRequireModifier(accelerator)) || in ParseImpl() 71 accelerator); in ParseImpl() 182 accelerator); in ParseImpl() [all …]
|
D | command.h | 29 const std::string& accelerator, 38 static ui::Accelerator StringToAccelerator(const std::string& accelerator, 43 static std::string AcceleratorToString(const ui::Accelerator& accelerator); 48 static bool IsMediaKey(const ui::Accelerator& accelerator); 63 const ui::Accelerator& accelerator() const { return accelerator_; } in accelerator() function 68 void set_accelerator(ui::Accelerator accelerator) { in set_accelerator() argument 69 accelerator_ = accelerator; in set_accelerator()
|
/external/chromium_org/chrome/browser/ui/views/ |
D | accelerator_utils_aura.cc | 16 bool IsChromeAccelerator(const ui::Accelerator& accelerator, Profile* profile) { in IsChromeAccelerator() argument 20 if (accel_data.keycode == accelerator.key_code() && in IsChromeAccelerator() 21 accel_data.modifiers == accelerator.modifiers()) { in IsChromeAccelerator() 31 if (it->keycode == accelerator.key_code() && in IsChromeAccelerator() 32 it->modifiers == accelerator.modifiers()) in IsChromeAccelerator() 40 ui::Accelerator accelerator; in GetPrimaryChromeAcceleratorForCommandId() local 44 if (GetStandardAcceleratorForCommandId(command_id, &accelerator) || in GetPrimaryChromeAcceleratorForCommandId() 47 &accelerator)) { in GetPrimaryChromeAcceleratorForCommandId() 48 return accelerator; in GetPrimaryChromeAcceleratorForCommandId()
|
/external/chromium_org/chrome/browser/extensions/api/commands/ |
D | command_service_browsertest.cc | 67 ui::Accelerator accelerator = command_service->FindCommandByName( in IN_PROC_BROWSER_TEST_F() local 68 kId, manifest_values::kBrowserActionCommandEvent).accelerator(); in IN_PROC_BROWSER_TEST_F() 69 EXPECT_EQ(ui::VKEY_F, accelerator.key_code()); in IN_PROC_BROWSER_TEST_F() 70 EXPECT_FALSE(accelerator.IsCtrlDown()); in IN_PROC_BROWSER_TEST_F() 71 EXPECT_TRUE(accelerator.IsShiftDown()); in IN_PROC_BROWSER_TEST_F() 72 EXPECT_TRUE(accelerator.IsAltDown()); in IN_PROC_BROWSER_TEST_F() 79 accelerator = command_service->FindCommandByName( in IN_PROC_BROWSER_TEST_F() 80 kId, manifest_values::kBrowserActionCommandEvent).accelerator(); in IN_PROC_BROWSER_TEST_F() 81 EXPECT_EQ(ui::VKEY_UNKNOWN, accelerator.key_code()); in IN_PROC_BROWSER_TEST_F() 88 accelerator = command_service->FindCommandByName( in IN_PROC_BROWSER_TEST_F() [all …]
|
D | command_service.cc | 57 const ui::Accelerator& accelerator, const std::string extension_id) { in GetPlatformKeybindingKeyForAccelerator() argument 59 Command::AcceleratorToString(accelerator); in GetPlatformKeybindingKeyForAccelerator() 65 if (Command::IsMediaKey(accelerator)) in GetPlatformKeybindingKeyForAccelerator() 200 ui::Accelerator shortcut_assigned = saved_command.accelerator(); in GetNamedCommands() 220 const ui::Accelerator& accelerator, in AddKeybindingPref() argument 225 if (accelerator.key_code() == ui::VKEY_UNKNOWN) in AddKeybindingPref() 231 if (existing_command.accelerator() == accelerator && in AddKeybindingPref() 236 DCHECK(!Command::IsMediaKey(accelerator) || in AddKeybindingPref() 244 std::string key = GetPlatformKeybindingKeyForAccelerator(accelerator, in AddKeybindingPref() 265 if (existing_command.accelerator().key_code() != ui::VKEY_UNKNOWN) in AddKeybindingPref() [all …]
|
/external/chromium_org/chrome/browser/ui/ash/ |
D | ime_controller_chromeos.cc | 16 bool ImeController::HandlePreviousIme(const ui::Accelerator& accelerator) { in HandlePreviousIme() argument 19 return manager->SwitchToPreviousInputMethod(accelerator); in HandlePreviousIme() 22 bool ImeController::HandleSwitchIme(const ui::Accelerator& accelerator) { in HandleSwitchIme() argument 25 return manager->SwitchInputMethod(accelerator); in HandleSwitchIme() 29 const ui::Accelerator& accelerator) { in RemapAccelerator() argument 30 ui::KeyboardCode key = accelerator.key_code(); in RemapAccelerator() 31 int modifiers = accelerator.modifiers(); in RemapAccelerator() 45 remapped_accelerator.set_type(accelerator.type()); in RemapAccelerator()
|
/external/chromium_org/ash/test/ |
D | test_volume_control_delegate.cc | 20 const ui::Accelerator& accelerator) { in HandleVolumeMute() argument 22 last_accelerator_ = accelerator; in HandleVolumeMute() 27 const ui::Accelerator& accelerator) { in HandleVolumeDown() argument 29 last_accelerator_ = accelerator; in HandleVolumeDown() 34 const ui::Accelerator& accelerator) { in HandleVolumeUp() argument 36 last_accelerator_ = accelerator; in HandleVolumeUp()
|
/external/chromium_org/chrome/browser/ui/views/extensions/ |
D | extension_keybinding_registry_views.cc | 57 if (!IsAcceleratorRegistered(iter->second.accelerator())) { in AddExtensionKeybinding() 58 focus_manager_->RegisterAccelerator(iter->second.accelerator(), in AddExtensionKeybinding() 63 AddEventTarget(iter->second.accelerator(), in AddExtensionKeybinding() 70 const ui::Accelerator& accelerator, in RemoveExtensionKeybindingImpl() argument 72 focus_manager_->UnregisterAccelerator(accelerator, this); in RemoveExtensionKeybindingImpl() 76 const ui::Accelerator& accelerator) { in AcceleratorPressed() argument 77 return ExtensionKeybindingRegistry::NotifyEventTargets(accelerator); in AcceleratorPressed()
|