Chromium Code Reviews| Index: ios/clean/chrome/browser/ui/commands/command_dispatcher.h |
| diff --git a/ios/clean/chrome/browser/ui/commands/command_dispatcher.h b/ios/clean/chrome/browser/ui/commands/command_dispatcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..753542f7897a815692bdc0e847431af0bead062f |
| --- /dev/null |
| +++ b/ios/clean/chrome/browser/ui/commands/command_dispatcher.h |
| @@ -0,0 +1,24 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef IOS_CLEAN_CHROME_BROWSER_UI_COMMANDS_COMMAND_DISPATCHER_H_ |
| +#define IOS_CLEAN_CHROME_BROWSER_UI_COMMANDS_COMMAND_DISPATCHER_H_ |
| + |
| +#import <Foundation/Foundation.h> |
| + |
| +// CommandDispatcher allows coordinators to register as command handlers for |
| +// specific selectors. Other objects can call these methods on the dispatcher, |
| +// which in turn will forward the call to the registered handler. |
| +@interface CommandDispatcher : NSObject |
|
marq (ping after 24h)
2017/03/16 13:54:46
Doesn't CommandDispatcher need to publicly conform
lpromero
2017/03/21 15:15:32
This is discussed upthread.
|
| + |
| +// Registers the given |target| to receive forwarded messages for the given |
| +// |selector|. |
| +- (void)registerTarget:(id)target forSelector:(SEL)selector; |
|
lpromero
2017/03/10 16:17:36
The comment doesn't specify that you can't have se
|
| + |
| +// Removes all forwarding registrations for the given |target|. |
| +- (void)stopDispatchingForTarget:(id)target; |
|
lpromero
2017/03/09 16:16:30
s/…/unregisterTarget: ?
rohitrao (ping after 24h)
2017/03/10 14:44:31
I went through a number of iterations:
unregisterT
lpromero
2017/03/10 16:17:36
Handler might convey more that fact that we can on
marq (ping after 24h)
2017/03/16 13:54:46
I like -stopDispatching:, so much that I'd like to
lpromero
2017/03/21 15:15:32
https://codereview.chromium.org/2766663002/
|
| + |
| +@end |
| + |
| +#endif // IOS_CLEAN_CHROME_BROWSER_UI_COMMANDS_COMMAND_DISPATCHER_H_ |