Index: chrome/browser/command_updater.cc |
=================================================================== |
--- chrome/browser/command_updater.cc (revision 144216) |
+++ chrome/browser/command_updater.cc (working copy) |
@@ -40,18 +40,21 @@ |
return commands_.find(id) != commands_.end(); |
} |
-void CommandUpdater::ExecuteCommand(int id) { |
- ExecuteCommandWithDisposition(id, CURRENT_TAB); |
+bool CommandUpdater::ExecuteCommand(int id) { |
+ return ExecuteCommandWithDisposition(id, CURRENT_TAB); |
} |
-void CommandUpdater::ExecuteCommandWithDisposition( |
+bool CommandUpdater::ExecuteCommandWithDisposition( |
int id, |
WindowOpenDisposition disposition) { |
- if (IsCommandEnabled(id)) |
+ if (SupportsCommand(id) && IsCommandEnabled(id)) { |
delegate_->ExecuteCommandWithDisposition(id, disposition); |
+ return true; |
+ } |
+ return false; |
} |
-CommandUpdater::CommandObserver::~CommandObserver() { |
+CommandObserver::~CommandObserver() { |
} |
void CommandUpdater::UpdateCommandEnabled(int id, bool enabled) { |