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

Unified Diff: ios/clean/chrome/browser/ui/context_menu/context_menu_item.h

Issue 2862783002: [iOS Clean] Wired up ContextMenuCommands. (Closed)
Patch Set: cleanup Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ios/clean/chrome/browser/ui/context_menu/context_menu_item.h
diff --git a/ios/clean/chrome/browser/ui/context_menu/context_menu_item.h b/ios/clean/chrome/browser/ui/context_menu/context_menu_item.h
new file mode 100644
index 0000000000000000000000000000000000000000..deb4d7ff3daf17cb25db0da4839b67b672278a9e
--- /dev/null
+++ b/ios/clean/chrome/browser/ui/context_menu/context_menu_item.h
@@ -0,0 +1,28 @@
+// 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_CONTEXT_MENU_CONTEXT_MENU_ITEM_H_
+#define IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_ITEM_H_
+
+#import <Foundation/Foundation.h>
+#include <vector>
+
+// Object encapsulating configuration information for an item in a context menu.
+@interface ContextMenuItem : NSObject
+
+// Create a new item with |title| and |commands|.
++ (instancetype)itemWithTitle:(NSString*)title
+ commands:(const std::vector<SEL>&)commands;
+
+// The title associated with the item. This is usually the text the user will
+// see.
+@property(nonatomic, readonly, copy) NSString* title;
+
+// The ContextMenuCommands to be dispatched with menu's ContextMenuContext.
+// They will be dispatched in the order in which they appear in the vector.
+@property(nonatomic, readonly, assign) const std::vector<SEL>& commands;
+
+@end
+
+#endif // IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_ITEM_H_

Powered by Google App Engine
This is Rietveld 408576698