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

Unified Diff: ios/chrome/browser/ui/context_menu/context_menu_provider.h

Issue 1891863004: Copy contents of ui/base/ios into ios/chrome/browser/ui/context_menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix HardwardKeyboard test Created 4 years, 8 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/chrome/browser/ui/context_menu/context_menu_provider.h
diff --git a/ios/chrome/browser/ui/context_menu/context_menu_provider.h b/ios/chrome/browser/ui/context_menu/context_menu_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..aa28d426eac21b77f3329c6bf647584f8ecee1d2
--- /dev/null
+++ b/ios/chrome/browser/ui/context_menu/context_menu_provider.h
@@ -0,0 +1,23 @@
+// Copyright 2016 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_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_PROVIDER_H_
+#define IOS_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_PROVIDER_H_
+
+// A protocol implemented by a provider of labels and actions for a context
+// menu.
+@protocol ContextMenuProvider<NSObject>
+
+// Returns a ContextMenuHolder with the titles and actions associated with
+// each menu item. The "Cancel" item is automatically added when constructing
+// the menu for presentation, therefore it should not be added to the list.
+// Each ContextMenuProvider might have different requirements for the
+// |contextDictionary|. On a web page |kContextLinkURLString| and
+// |kContextImageURLString| might both be set whereas on a recently visited
+// entry some other identifier will be passed on.
+- (ContextMenuHolder*)contextMenuForDictionary:(NSDictionary*)context;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698