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

Side by Side Diff: ios/clean/chrome/browser/ui/context_menu/context_menu_mediator.h

Issue 2862783002: [iOS Clean] Wired up ContextMenuCommands. (Closed)
Patch Set: fix deps Created 3 years, 6 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_MEDIATOR_H_ 5 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_MEDIATOR_H_
6 #define IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_MEDIATOR_H_ 6 #define IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_MEDIATOR_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 @protocol ContextMenuConsumer; 10 @protocol ContextMenuConsumer;
11 @class ContextMenuContextImpl;
11 12
12 // A mediator object that provides configuration information for a context 13 // A mediator object that provides configuration information for a context
13 // menu. 14 // menu.
14 @interface ContextMenuMediator : NSObject 15 @interface ContextMenuMediator : NSObject
15 16
16 // Creates a new mediator with the non-nil consumer |consumer|. 17 // Populates |consumer| with alert items for actions appropriate for |context|.
17 - (instancetype)initWithConsumer:(id<ContextMenuConsumer>)consumer; 18 + (void)updateConsumer:(id<ContextMenuConsumer>)consumer
19 withContext:(ContextMenuContextImpl*)context;
20
21 // A ContextMenuConsumer only requires configuration only once, then is
22 // immutable. As a result, there is no need to instantiate an object to manage
23 // ongoing consumer updates; use |+updateConsumer:withContext:| instead.
24 - (instancetype)init NS_UNAVAILABLE;
18 25
19 @end 26 @end
20 27
21 #endif // IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_MEDIATOR_H_ 28 #endif // IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_MEDIATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698