Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4655)

Unified Diff: chrome/browser/command_updater.h

Issue 11308259: chrome: Extract CommandUpdaterDelegate into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: FakeCommandObserver Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/command_observer.h ('k') | chrome/browser/command_updater.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/command_updater.h
diff --git a/chrome/browser/command_updater.h b/chrome/browser/command_updater.h
index 0bbbb364cde466504b5add9222094bdfd428b396..840cb030444ad2fa2f78efe089050ef856a97fb6 100644
--- a/chrome/browser/command_updater.h
+++ b/chrome/browser/command_updater.h
@@ -10,6 +10,7 @@
#include "webkit/glue/window_open_disposition.h"
class CommandObserver;
+class CommandUpdaterDelegate;
////////////////////////////////////////////////////////////////////////////////
//
@@ -21,24 +22,10 @@ class CommandObserver;
//
class CommandUpdater {
public:
- // A Delegate object implements this interface so that it can execute commands
- // when needed.
- class CommandUpdaterDelegate {
- public:
- // Performs the action associated with the command with the specified ID and
- // using the given disposition.
- virtual void ExecuteCommandWithDisposition(
- int id,
- WindowOpenDisposition disposition) = 0;
-
- protected:
- virtual ~CommandUpdaterDelegate();
- };
-
- // Create a CommandUpdater with a CommandUpdaterDelegate to handle execution
- // of specific commands.
- explicit CommandUpdater(CommandUpdaterDelegate* handler);
- virtual ~CommandUpdater();
+ // Create a CommandUpdater with |delegate| to handle the execution of specific
+ // commands.
+ explicit CommandUpdater(CommandUpdaterDelegate* delegate);
+ ~CommandUpdater();
sky 2012/12/06 01:38:08 In general if there are subclasses we make the des
tfarina 2012/12/06 01:41:40 If I understand you, and you are concerned about t
// Returns true if the specified command ID is supported.
bool SupportsCommand(int id) const;
@@ -91,7 +78,6 @@ class CommandUpdater {
typedef base::hash_map<int, Command*> CommandMap;
CommandMap commands_;
- CommandUpdater();
DISALLOW_COPY_AND_ASSIGN(CommandUpdater);
};
« no previous file with comments | « chrome/browser/command_observer.h ('k') | chrome/browser/command_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698