Lines Matching refs:command

167                                              Command* command,
170 extension_id, type, command, active, BROWSER_ACTION);
175 Command* command,
178 extension_id, type, command, active, PAGE_ACTION);
197 // Look up to see if the user has overridden how the command should work.
205 Command command = iter->second;
210 command.set_accelerator(shortcut_assigned);
211 command.set_global(saved_command.global());
213 (*command_map)[iter->second.command_name()] = command;
228 // Nothing needs to be done if the existing command is the same as the desired
235 // Media Keys are allowed to be used by named command only.
251 // If the shortcut has been assigned to another command, it should be
263 // If the command that is taking a new shortcut already has a shortcut, remove
316 Command command = FindCommandByName(extension_id, command_name);
318 // The extension command might be assigned another shortcut. Remove that
325 true, command.global());
331 Command command = FindCommandByName(extension_id, command_name);
332 if (global == command.global())
338 AddKeybindingPref(command.accelerator(), extension_id,
344 const std::string& command) const {
358 if (command != command_name)
381 Command* command,
396 if (command)
397 *command = prospective_command;
406 if (command)
407 *command = prospective_command;
419 if (command)
420 *command = it->second;
479 // The browser action command may be defaulted to an unassigned
519 const Command command = iter->second;
520 if (CanAutoAssign(command, extension)) {
521 AddKeybindingPref(command.accelerator(),
523 command.command_name(),
525 command.global());
551 bool CommandService::CanAutoAssign(const Command &command,
554 if (Command::IsMediaKey(command.accelerator()))
559 if (IsCommandShortcutUserModified(extension, command.command_name()))
562 if (command.global()) {
564 if (command.command_name() == manifest_values::kBrowserActionCommandEvent ||
565 command.command_name() == manifest_values::kPageActionCommandEvent)
574 if (!command.accelerator().IsCmdDown())
577 if (!command.accelerator().IsCtrlDown())
580 if (!command.accelerator().IsShiftDown())
582 return (command.accelerator().key_code() >= ui::VKEY_0 &&
583 command.accelerator().key_code() <= ui::VKEY_9);
585 // Not a global command, check if Chrome shortcut and whether
587 if (command.accelerator() ==
594 DCHECK(chrome::IsChromeAccelerator(command.accelerator(), profile_));
598 return !chrome::IsChromeAccelerator(command.accelerator(), profile_);
611 const Command command = iter->second;
615 Command::AcceleratorToString(command.accelerator()));
616 suggested_key_prefs->Set(command.command_name(), command_keys.release());
622 // The browser action command may be defaulted to an unassigned accelerator if
670 // The browser action command may be defaulted to an unassigned
727 // Get the new assigned command, if any.
733 } else { // This is a named command.
790 // If |command_name| is specified, delete only that command. Otherwise,
793 std::string command;
794 item->GetString(kCommandName, &command);
795 if (command_name != command)
821 Command* command,
847 // Look up to see if the user has overridden how the command should work.
859 *command = *requested_command;
861 command->set_accelerator(shortcut_assigned);