Commit 95e1e74a authored by Ewann's avatar Ewann Committed by Commit Bot

[iOS] Reorder custom actions

This Cl reoders custom actions according to the Design Doc.

===
1. All Open Actions
2. All Actions that are unique to the feature (e.g. Mark as Read, Search for Image)
3. All Copy Actions
4. All Edit Actions (Edit and Move)
5. Share...
6. Delete (and in Red)
===

see: http://doc/18YOOXHNEYjiXMqVxC7mLKY54zopziHkpJovcIKB5Dp0

Bug: 1093302
Change-Id: Ib0e62dd6a5df1b81740a116861120caa8f7f5c6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2336833
Commit-Queue: Ewann Pellé <ewannpv@chromium.org>
Reviewed-by: default avatarSebastien Lalancette <seblalancette@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795451}
parent d37063d6
......@@ -198,16 +198,13 @@
NSMutableArray<UIMenuElement*>* menuElements =
[[NSMutableArray alloc] init];
// Copy URL action.
[menuElements addObject:[actionFactory actionToCopyURL:item.URL]];
// "Open in" actions.
[menuElements
addObject:[actionFactory
actionToOpenInNewTabWithURL:item.URL
completion:^{
[weakSelf onOpenedURLInNewTab];
}]];
[menuElements
addObject:
[actionFactory
......@@ -216,6 +213,7 @@
[weakSelf
onOpenedURLInNewIncognitoTab];
}]];
if (IsMultipleScenesSupported()) {
[menuElements
addObject:
......@@ -225,7 +223,8 @@
completion:nil]];
}
// Delete action.
[menuElements addObject:[actionFactory actionToCopyURL:item.URL]];
[menuElements addObject:[actionFactory actionToDeleteWithBlock:^{
[historyItemDelegate historyEntryItemDidRequestDelete:item];
}]];
......
......@@ -442,16 +442,13 @@ animationControllerForDismissedController:(UIViewController*)dismissed {
NSMutableArray<UIMenuElement*>* menuElements =
[[NSMutableArray alloc] init];
// Copy URL action.
[menuElements addObject:[actionFactory actionToCopyURL:item.entryURL]];
// "Open in" actions.
[menuElements addObject:[actionFactory actionToOpenInNewTabWithBlock:^{
[weakSelf loadEntryURL:item.entryURL
withOfflineURL:GURL::EmptyGURL()
inNewTab:YES
incognito:NO];
}]];
[menuElements
addObject:[actionFactory actionToOpenInNewIncognitoTabWithBlock:^{
[weakSelf loadEntryURL:item.entryURL
......@@ -459,6 +456,7 @@ animationControllerForDismissedController:(UIViewController*)dismissed {
inNewTab:YES
incognito:YES];
}]];
if (IsMultipleScenesSupported()) {
[menuElements
addObject:[actionFactory
......@@ -468,6 +466,8 @@ animationControllerForDismissedController:(UIViewController*)dismissed {
completion:nil]];
}
[menuElements addObject:[actionFactory actionToCopyURL:item.entryURL]];
return [UIMenu menuWithTitle:@"" children:menuElements];
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment