Home | History | Annotate | Download | only in browser

Lines Matching refs:id

31 bool CommandUpdater::SupportsCommand(int id) const {
32 return commands_.find(id) != commands_.end();
35 bool CommandUpdater::IsCommandEnabled(int id) const {
36 const CommandMap::const_iterator command(commands_.find(id));
42 bool CommandUpdater::ExecuteCommand(int id) {
43 return ExecuteCommandWithDisposition(id, CURRENT_TAB);
47 int id,
49 if (SupportsCommand(id) && IsCommandEnabled(id)) {
50 delegate_->ExecuteCommandWithDisposition(id, disposition);
56 void CommandUpdater::AddCommandObserver(int id, CommandObserver* observer) {
57 GetCommand(id, true)->observers.AddObserver(observer);
60 void CommandUpdater::RemoveCommandObserver(int id, CommandObserver* observer) {
61 GetCommand(id, false)->observers.RemoveObserver(observer);
74 void CommandUpdater::UpdateCommandEnabled(int id, bool enabled) {
75 Command* command = GetCommand(id, true);
80 EnabledStateChangedForCommand(id, enabled));
83 CommandUpdater::Command* CommandUpdater::GetCommand(int id, bool create) {
84 bool supported = SupportsCommand(id);
86 return commands_[id];
89 commands_[id] = command;