[iOS] Improve UI command names
This change updates UI command names across the codebase to conform to
Chrome iOS best practices, enhancing code clarity and consistency.
Command names now use clear imperative verbs that accurately describe
their intended UI actions (e.g., -showShareSheet and -addBookmarks:).
Additionally, for some commands, the redundant -maybe prefix has been
removed, as UI commands are inherently conditional.
ActivityServiceCommands (activity_service_commands.h)
Old: -sharePage
New: -showShareSheet
Old: -shareChromeApp
New: -showShareSheetForChromeApp
Old: -shareHighlight:
New: -showShareSheetForHighlight:
Old: -shareURLFromContextMenu:
New: -showShareSheetForURL:
BookmarksCommands (bookmarks_commands.h)
Old: -bookmarkWithFolderChooser:
New: -addBookmarksAndShowFolderChooser:
Old: -bookmarkWithWebState:
New: -addBookmarkForWebState:
Old: -bulkCreateBookmarksWithURLs:
New: -addBookmarks:
Old: -createOrEditBookmarkWithURL:
New: -addOrEditBookmark:
Old: -openToExternalBookmark:
New: -showBookmarkInBookmarksUI:
ContextualPanelEntrypointCommands
(contextual_panel_entrypoint_commands.h)
Old: -contextualPanelEntrypointIPHWasDismissed
New: -notifyContextualPanelEntrypointIPHDismissed
ContextualPanelEntrypointIPHCommands
(contextual_panel_entrypoint_iph_commands.h)
Old: -maybeShowContextualPanelEntrypointIPHWithConfig:
New: -showContextualPanelEntrypointIPHWithConfig:
Old: -dismissContextualPanelEntrypointIPHAnimated:(BOOL)animated
New: -dismissContextualPanelEntrypointIPH:(BOOL)animated
PromosManagerCommands (promos_manager_commands.h)
Old: -maybeDisplayPromo
New: -displayPromo
Old: -requestAppStoreReview
New: -showAppStoreReviewPrompt
Old: -maybeDisplayDefaultBrowserPromo
New: -displayDefaultBrowserPromo
QRGenerationCommands (qr_generation_commands.h)
Old: -generateQRCode:
New: -showQRCode:
Fixed: 394284386
Change-Id: I8b7513b7592dd28594a44a3452425612bd86f693
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6229349
Reviewed-by: Robbie Gibson <rkgibson@google.com>
Reviewed-by: Nicolas MacBeth <nicolasmacbeth@google.com>
Reviewed-by: Mark Cogan <marq@chromium.org>
Commit-Queue: Benjamin Williams <bwwilliams@google.com>
Cr-Commit-Position: refs/heads/main@{#1416360}
NOKEYCHECK=True
GitOrigin-RevId: 94a5598aaa8ca10ef442128c26721fc2078889ac
diff --git a/chrome/browser/app_store_rating/ui_bundled/app_store_rating_display_handler.mm b/chrome/browser/app_store_rating/ui_bundled/app_store_rating_display_handler.mm
index 6c1b5f4..4c965c1 100644
--- a/chrome/browser/app_store_rating/ui_bundled/app_store_rating_display_handler.mm
+++ b/chrome/browser/app_store_rating/ui_bundled/app_store_rating_display_handler.mm
@@ -21,7 +21,7 @@
DCHECK(self.handler);
if (GetApplicationContext()->GetLocalState()->GetBoolean(
prefs::kAppStoreRatingPolicyEnabled)) {
- [self.handler requestAppStoreReview];
+ [self.handler showAppStoreReviewPrompt];
}
}
diff --git a/chrome/browser/bookmarks/ui_bundled/home/bookmarks_coordinator.mm b/chrome/browser/bookmarks/ui_bundled/home/bookmarks_coordinator.mm
index 4e8c774..01ad6a2 100644
--- a/chrome/browser/bookmarks/ui_bundled/home/bookmarks_coordinator.mm
+++ b/chrome/browser/bookmarks/ui_bundled/home/bookmarks_coordinator.mm
@@ -574,14 +574,13 @@
#pragma mark - BookmarksCommands
-- (void)bookmarkWithWebState:(web::WebState*)webState {
+- (void)addBookmarkForWebState:(web::WebState*)webState {
GURL URL = webState->GetLastCommittedURL();
NSString* title = tab_util::GetTabTitle(webState);
- [self createOrEditBookmarkWithURL:[[URLWithTitle alloc] initWithURL:URL
- title:title]];
+ [self addOrEditBookmark:[[URLWithTitle alloc] initWithURL:URL title:title]];
}
-- (void)bulkCreateBookmarksWithURLs:(NSArray<NSURL*>*)URLs {
+- (void)addBookmarks:(NSArray<NSURL*>*)URLs {
if (!_bookmarkModel->loaded()) {
return;
}
@@ -598,7 +597,7 @@
viewAction:viewAction]];
}
-- (void)createOrEditBookmarkWithURL:(URLWithTitle*)URLWithTitle {
+- (void)addOrEditBookmark:(URLWithTitle*)URLWithTitle {
DCHECK(URLWithTitle) << [self description];
NSString* title = URLWithTitle.title;
GURL URL = URLWithTitle.URL;
@@ -615,7 +614,7 @@
}
}
-- (void)bookmarkWithFolderChooser:(NSArray<URLWithTitle*>*)URLs {
+- (void)addBookmarksAndShowFolderChooser:(NSArray<URLWithTitle*>*)URLs {
DCHECK(URLs.count > 0) << "URLs are missing " << [self description];
if (!_bookmarkModel->loaded()) {
@@ -626,7 +625,7 @@
[self presentFolderChooser];
}
-- (void)openToExternalBookmark:(GURL)URL {
+- (void)showBookmarkInBookmarksUI:(GURL)URL {
if (!_bookmarkModel->loaded()) {
return;
}
diff --git a/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm b/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm
index bab28de..347138a 100644
--- a/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm
+++ b/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm
@@ -1678,7 +1678,7 @@
}
[HandlerForProtocol(self.dispatcher, ContextualPanelEntrypointCommands)
- contextualPanelEntrypointIPHWasDismissed];
+ notifyContextualPanelEntrypointIPHDismissed];
ProfileIOS* profile = self.browser->GetProfile();
feature_engagement::Tracker* engagementTracker =
@@ -1752,7 +1752,7 @@
[self.sharingCoordinator start];
}
-- (void)sharePage {
+- (void)showShareSheet {
// Defocus Find-In-Page before opening the share sheet. This will result in
// closing the Find-In-Page for some OS versions.
[self defocusFindInPage];
@@ -1764,7 +1764,7 @@
}
}
-- (void)shareChromeApp {
+- (void)showShareSheetForChromeApp {
GURL URL = GURL(kChromeAppStoreUrl);
NSString* title =
l10n_util::GetNSString(IDS_IOS_OVERFLOW_MENU_SHARE_CHROME_TITLE);
@@ -1789,7 +1789,7 @@
[self.sharingCoordinator start];
}
-- (void)shareHighlight:(ShareHighlightCommand*)command {
+- (void)showShareSheetForHighlight:(ShareHighlightCommand*)command {
SharingParams* params =
[[SharingParams alloc] initWithURL:command.URL
title:command.title
@@ -1806,7 +1806,7 @@
[self.sharingCoordinator start];
}
-- (void)shareURLFromContextMenu:(ActivityServiceShareURLCommand*)command {
+- (void)showShareSheetForURL:(ActivityServiceShareURLCommand*)command {
SharingParams* params = [[SharingParams alloc]
initWithURL:command.URL
title:command.title
@@ -2327,10 +2327,10 @@
#pragma mark - ContextualPanelEntrypointIPHCommands
-- (BOOL)maybeShowContextualPanelEntrypointIPHWithConfig:
+- (BOOL)showContextualPanelEntrypointIPHWithConfig:
(ContextualPanelItemConfiguration*)config
- anchorPoint:(CGPoint)anchorPoint
- isBottomOmnibox:(BOOL)isBottomOmnibox {
+ anchorPoint:(CGPoint)anchorPoint
+ isBottomOmnibox:(BOOL)isBottomOmnibox {
ContextualPanelItemConfiguration& config_ref = CHECK_DEREF(config);
feature_engagement::Tracker* engagementTracker =
@@ -2398,7 +2398,7 @@
return YES;
}
-- (void)dismissContextualPanelEntrypointIPHAnimated:(BOOL)animated {
+- (void)dismissContextualPanelEntrypointIPH:(BOOL)animated {
[_contextualPanelEntrypointHelpPresenter dismissAnimated:animated];
_contextualPanelEntrypointHelpPresenter = nil;
}
@@ -2694,7 +2694,7 @@
#pragma mark - PromosManagerCommands
-- (void)maybeDisplayPromo {
+- (void)showPromo {
if (!self.promosManagerCoordinator) {
id<CredentialProviderPromoCommands> credentialProviderPromoHandler =
HandlerForProtocol(self.browser->GetCommandDispatcher(),
@@ -2723,7 +2723,7 @@
}
}
-- (void)requestAppStoreReview {
+- (void)showAppStoreReviewPrompt {
if (IsAppStoreRatingEnabled()) {
UIWindowScene* scene = [self.browser->GetSceneState() scene];
[SKStoreReviewController requestReviewInScene:scene];
@@ -2741,7 +2741,7 @@
self.whatsNewCoordinator.shouldShowBubblePromoOnDismiss = YES;
}
-- (void)maybeDisplayDefaultBrowserPromo {
+- (void)showDefaultBrowserPromo {
if (self.defaultBrowserGenericPromoCoordinator) {
// The default browser promo manager is already being displayed. Early
// return as this is expected if a default browser promo was open and the
@@ -2759,7 +2759,7 @@
[self.defaultBrowserGenericPromoCoordinator start];
}
-- (void)displayDefaultBrowserPromoAfterRemindMeLater {
+- (void)showDefaultBrowserPromoAfterRemindMeLater {
self.defaultBrowserGenericPromoCoordinator =
[[DefaultBrowserGenericPromoCoordinator alloc]
initWithBaseViewController:self.viewController
diff --git a/chrome/browser/browser_view/ui_bundled/browser_coordinator_unittest.mm b/chrome/browser/browser_view/ui_bundled/browser_coordinator_unittest.mm
index 1d94907..ca9ca46 100644
--- a/chrome/browser/browser_view/ui_bundled/browser_coordinator_unittest.mm
+++ b/chrome/browser/browser_view/ui_bundled/browser_coordinator_unittest.mm
@@ -241,9 +241,9 @@
EXPECT_OCMOCK_VERIFY(shared_application_mock);
}
-// Tests that -sharePage is leaving fullscreena and starting the share
+// Tests that `-showShareSheet` is leaving fullscreen and starting the share
// coordinator.
-TEST_F(BrowserCoordinatorTest, SharePage) {
+TEST_F(BrowserCoordinatorTest, ShowShareSheet) {
FullscreenModel model;
std::unique_ptr<TestFullscreenController> controller =
std::make_unique<TestFullscreenController>(&model);
@@ -270,7 +270,7 @@
BrowserCoordinator* browser_coordinator = GetBrowserCoordinator();
[browser_coordinator start];
- [browser_coordinator sharePage];
+ [browser_coordinator showShareSheet];
// Check that fullscreen is exited.
EXPECT_EQ(1.0, controller_ptr->GetProgress());
@@ -281,10 +281,10 @@
EXPECT_OCMOCK_VERIFY(classMock);
}
-// Tests that -shareChromeApp is instantiating the SharingCoordinator
-// with SharingParams where scenario is ShareChrome, leaving fullscreen
-// and starting the share coordinator.
-TEST_F(BrowserCoordinatorTest, ShareChromeApp) {
+// Tests that `-showShareSheetForChromeApp` is instantiating the
+// SharingCoordinator with SharingParams where scenario is ShareChrome, leaving
+// fullscreen and starting the share coordinator.
+TEST_F(BrowserCoordinatorTest, ShowShareSheetForChromeApp) {
FullscreenModel model;
std::unique_ptr<TestFullscreenController> controller =
std::make_unique<TestFullscreenController>(&model);
@@ -314,7 +314,7 @@
BrowserCoordinator* browser_coordinator = GetBrowserCoordinator();
[browser_coordinator start];
- [browser_coordinator shareChromeApp];
+ [browser_coordinator showShareSheetForChromeApp];
// Check that fullscreen is exited.
EXPECT_EQ(1.0, controller_ptr->GetProgress());
@@ -417,10 +417,10 @@
[browser_coordinator stop];
}
-// Tests that the displayDefaultBrowserPromoAfterRemindMeLater command does not
+// Tests that the `-showDefaultBrowserPromoAfterRemindMeLater` command does not
// crash.
-TEST_F(BrowserCoordinatorTest, DisplayDefaultBrowserPromoAfterRemindMeLater) {
- // Start the BrowserCoordinator
+TEST_F(BrowserCoordinatorTest, ShowDefaultBrowserPromoAfterRemindMeLater) {
+ // Starts the `BrowserCoordinator`.
BrowserCoordinator* browser_coordinator = GetBrowserCoordinator();
[browser_coordinator start];
@@ -428,7 +428,7 @@
id<PromosManagerCommands> handler =
HandlerForProtocol(dispatcher, PromosManagerCommands);
- [handler displayDefaultBrowserPromoAfterRemindMeLater];
+ [handler showDefaultBrowserPromoAfterRemindMeLater];
[browser_coordinator stop];
}
diff --git a/chrome/browser/browser_view/ui_bundled/key_commands_provider.mm b/chrome/browser/browser_view/ui_bundled/key_commands_provider.mm
index fb108a8..1962c00 100644
--- a/chrome/browser/browser_view/ui_bundled/key_commands_provider.mm
+++ b/chrome/browser/browser_view/ui_bundled/key_commands_provider.mm
@@ -389,8 +389,7 @@
NSString* title = tab_util::GetTabTitle(currentWebState);
[_bookmarksHandler
- createOrEditBookmarkWithURL:[[URLWithTitle alloc] initWithURL:URL
- title:title]];
+ addOrEditBookmark:[[URLWithTitle alloc] initWithURL:URL title:title]];
}
- (void)keyCommand_reload {
diff --git a/chrome/browser/browser_view/ui_bundled/key_commands_provider_unittest.mm b/chrome/browser/browser_view/ui_bundled/key_commands_provider_unittest.mm
index 656fe6e..e455b53 100644
--- a/chrome/browser/browser_view/ui_bundled/key_commands_provider_unittest.mm
+++ b/chrome/browser/browser_view/ui_bundled/key_commands_provider_unittest.mm
@@ -772,8 +772,7 @@
id addCommand = [OCMArg checkWithBlock:^BOOL(URLWithTitle* URL) {
return URL.URL == url;
}];
- OCMExpect(
- [provider_.bookmarksHandler createOrEditBookmarkWithURL:addCommand]);
+ OCMExpect([provider_.bookmarksHandler addOrEditBookmark:addCommand]);
web::FakeWebState* web_state = InsertNewWebState(0);
web_state->SetCurrentURL(url);
diff --git a/chrome/browser/context_menu/ui_bundled/context_menu_configuration_provider.mm b/chrome/browser/context_menu/ui_bundled/context_menu_configuration_provider.mm
index 36b60a5..7b95b2f 100644
--- a/chrome/browser/context_menu/ui_bundled/context_menu_configuration_provider.mm
+++ b/chrome/browser/context_menu/ui_bundled/context_menu_configuration_provider.mm
@@ -853,7 +853,8 @@
completion:nil];
}
-// Calls the shareURLFromContextMenu with the given command.
+// Calls the `-showShareSheetForURL:` command with the given
+// `ActivityServiceShareURLCommand` command.
- (void)shareURLFromContextMenu:(const GURL&)URLToShare
URLTitle:(NSString*)URLTitle
params:(web::ContextMenuParams)params {
@@ -867,7 +868,7 @@
title:URLTitle
sourceView:params.view
sourceRect:sourceRect];
- [handler shareURLFromContextMenu:command];
+ [handler showShareSheetForURL:command];
}
// Informs the delegate that a new tab has been opened in the background.
diff --git a/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.mm b/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.mm
index d6eafce..900cf89 100644
--- a/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.mm
+++ b/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.mm
@@ -136,7 +136,7 @@
#pragma mark - ContextualPanelEntrypointCommands
-- (void)contextualPanelEntrypointIPHWasDismissed {
+- (void)notifyContextualPanelEntrypointIPHDismissed {
[self enableFullscreen];
[_mediator.consumer setEntrypointColored:NO];
}
diff --git a/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator.mm b/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator.mm
index c7ba45b..b5c4cd9 100644
--- a/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator.mm
+++ b/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator.mm
@@ -460,15 +460,15 @@
[self.delegate helpAnchorUsingBottomOmnibox:isBottomOmnibox];
BOOL shown = [_entrypointHelpHandler
- maybeShowContextualPanelEntrypointIPHWithConfig:config
- anchorPoint:anchorPoint
- isBottomOmnibox:isBottomOmnibox];
+ showContextualPanelEntrypointIPHWithConfig:config
+ anchorPoint:anchorPoint
+ isBottomOmnibox:isBottomOmnibox];
return shown;
}
- (void)dismissEntrypointIPHAnimated:(BOOL)animated {
- [_entrypointHelpHandler dismissContextualPanelEntrypointIPHAnimated:animated];
+ [_entrypointHelpHandler dismissContextualPanelEntrypointIPH:animated];
[self.consumer setEntrypointColored:NO];
}
diff --git a/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator_unittest.mm b/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator_unittest.mm
index de0226e..2806a87 100644
--- a/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator_unittest.mm
+++ b/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator_unittest.mm
@@ -252,7 +252,7 @@
[[mocked_contextual_sheet_handler_ expect] openContextualSheet];
[[mocked_entrypoint_help_handler_ expect]
- dismissContextualPanelEntrypointIPHAnimated:YES];
+ dismissContextualPanelEntrypointIPH:YES];
[mediator_ entrypointTapped];
tab_helper->OpenContextualPanel();
@@ -260,7 +260,7 @@
[[mocked_contextual_sheet_handler_ expect] closeContextualSheet];
[[mocked_entrypoint_help_handler_ expect]
- dismissContextualPanelEntrypointIPHAnimated:YES];
+ dismissContextualPanelEntrypointIPH:YES];
[mediator_ entrypointTapped];
tab_helper->CloseContextualPanel();
@@ -289,7 +289,7 @@
TEST_F(ContextualPanelEntrypointMediatorTest, TestTabHelperDestroyed) {
[[mocked_entrypoint_help_handler_ expect]
- dismissContextualPanelEntrypointIPHAnimated:NO];
+ dismissContextualPanelEntrypointIPH:NO];
// Start off with entrypoint showing.
[entrypoint_consumer_ showEntrypoint];
@@ -308,7 +308,7 @@
TEST_F(ContextualPanelEntrypointMediatorTest, TestOneConfiguration) {
const base::HistogramTester histogram_tester;
[[mocked_entrypoint_help_handler_ expect]
- dismissContextualPanelEntrypointIPHAnimated:NO];
+ dismissContextualPanelEntrypointIPH:NO];
ContextualPanelItemConfiguration configuration(
ContextualPanelItemType::SamplePanelItem);
@@ -359,7 +359,7 @@
TEST_F(ContextualPanelEntrypointMediatorTest, TestLargeEntrypointAppears) {
const base::HistogramTester histogram_tester;
[[mocked_entrypoint_help_handler_ expect]
- dismissContextualPanelEntrypointIPHAnimated:NO];
+ dismissContextualPanelEntrypointIPH:NO];
std::unique_ptr<SamplePanelItemConfiguration> configuration =
std::make_unique<SamplePanelItemConfiguration>();
@@ -430,15 +430,14 @@
configuration->iph_title = "test_title";
configuration->iph_image_name = "test_image";
- OCMStub(
- [mocked_entrypoint_help_handler_
- maybeShowContextualPanelEntrypointIPHWithConfig:configuration.get()
- anchorPoint:CGPointMake(0, 0)
- isBottomOmnibox:NO])
+ OCMStub([mocked_entrypoint_help_handler_
+ showContextualPanelEntrypointIPHWithConfig:configuration.get()
+ anchorPoint:CGPointMake(0, 0)
+ isBottomOmnibox:NO])
.andReturn(YES);
[[mocked_entrypoint_help_handler_ expect]
- dismissContextualPanelEntrypointIPHAnimated:NO];
+ dismissContextualPanelEntrypointIPH:NO];
delegate_.canShowLargeContextualPanelEntrypoint = YES;
@@ -467,7 +466,7 @@
EXPECT_TRUE(entrypoint_consumer_.entrypointIsColored);
[[mocked_entrypoint_help_handler_ expect]
- dismissContextualPanelEntrypointIPHAnimated:YES];
+ dismissContextualPanelEntrypointIPH:YES];
// Advance time until the IPH is dismissed.
task_environment_.FastForwardBy(
@@ -498,9 +497,9 @@
// Tests a change in the active WebState.
TEST_F(ContextualPanelEntrypointMediatorTest, TestWebStateListChanged) {
[[mocked_entrypoint_help_handler_ expect]
- dismissContextualPanelEntrypointIPHAnimated:NO];
+ dismissContextualPanelEntrypointIPH:NO];
[[mocked_entrypoint_help_handler_ expect]
- dismissContextualPanelEntrypointIPHAnimated:NO];
+ dismissContextualPanelEntrypointIPH:NO];
auto web_state = std::make_unique<web::FakeWebState>();
std::map<ContextualPanelItemType, raw_ptr<ContextualPanelModel>> models;
diff --git a/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_promo_display_handler.mm b/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_promo_display_handler.mm
index 1e83dbb..28c4b12 100644
--- a/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_promo_display_handler.mm
+++ b/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_promo_display_handler.mm
@@ -16,7 +16,7 @@
- (void)handleDisplay {
DCHECK(self.handler);
- [self.handler maybeDisplayDefaultBrowserPromo];
+ [self.handler showDefaultBrowserPromo];
}
#pragma mark - PromoProtocol
diff --git a/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_remind_me_later_promo_display_handler.mm b/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_remind_me_later_promo_display_handler.mm
index ad570e8..277a570 100644
--- a/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_remind_me_later_promo_display_handler.mm
+++ b/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_remind_me_later_promo_display_handler.mm
@@ -16,7 +16,7 @@
- (void)handleDisplay {
DCHECK(self.handler);
- [self.handler displayDefaultBrowserPromoAfterRemindMeLater];
+ [self.handler showDefaultBrowserPromoAfterRemindMeLater];
}
#pragma mark - PromoProtocol
diff --git a/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_remind_me_later_promo_display_handler_unittest.mm b/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_remind_me_later_promo_display_handler_unittest.mm
index d3274f2..99f09e3 100644
--- a/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_remind_me_later_promo_display_handler_unittest.mm
+++ b/chrome/browser/default_promo/ui_bundled/promo_handler/default_browser_remind_me_later_promo_display_handler_unittest.mm
@@ -15,16 +15,16 @@
@interface FakePromosManagerCommandHandler : NSObject <PromosManagerCommands>
@property(nonatomic, assign)
- BOOL displayDefaultBrowserPromoAfterRemindMeLaterCalled;
+ BOOL showDefaultBrowserPromoAfterRemindMeLaterCalled;
@end
@implementation FakePromosManagerCommandHandler
-- (void)maybeDisplayPromo {
+- (void)showPromo {
}
-- (void)requestAppStoreReview {
+- (void)showAppStoreReviewPrompt {
}
- (void)showSignin:(ShowSigninCommand*)command {
@@ -36,11 +36,11 @@
- (void)showChoicePromo {
}
-- (void)maybeDisplayDefaultBrowserPromo {
+- (void)showDefaultBrowserPromo {
}
-- (void)displayDefaultBrowserPromoAfterRemindMeLater {
- self.displayDefaultBrowserPromoAfterRemindMeLaterCalled = YES;
+- (void)showDefaultBrowserPromoAfterRemindMeLater {
+ self.showDefaultBrowserPromoAfterRemindMeLaterCalled = YES;
}
- (void)showOmniboxPositionChoicePromo {
@@ -72,8 +72,7 @@
[[FakePromosManagerCommandHandler alloc] init];
display_handler.handler = command_handler;
- // Call method and check that the fake has been notified.
+ // Calls method and checks that the fake has been notified.
[display_handler handleDisplay];
- EXPECT_TRUE(
- command_handler.displayDefaultBrowserPromoAfterRemindMeLaterCalled);
+ EXPECT_TRUE(command_handler.showDefaultBrowserPromoAfterRemindMeLaterCalled);
}
diff --git a/chrome/browser/link_to_text/ui_bundled/link_to_text_mediator.mm b/chrome/browser/link_to_text/ui_bundled/link_to_text_mediator.mm
index cd1f1a3..6b5a3fe 100644
--- a/chrome/browser/link_to_text/ui_bundled/link_to_text_mediator.mm
+++ b/chrome/browser/link_to_text/ui_bundled/link_to_text_mediator.mm
@@ -95,7 +95,7 @@
selectedText:payload.selectedText
sourceView:payload.sourceView
sourceRect:payload.sourceRect];
- [self.activityServiceHandler shareHighlight:command];
+ [self.activityServiceHandler showShareSheetForHighlight:command];
}
- (void)linkGenerationFailedWithError:(LinkGenerationError)error {
@@ -122,7 +122,7 @@
action:^{
base::RecordAction(base::UserMetricsAction(
"SharedHighlights.LinkGenerated.Error.SharePage"));
- [weakSelf.activityServiceHandler sharePage];
+ [weakSelf.activityServiceHandler showShareSheet];
}
style:UIAlertActionStyleDefault
preferred:NO];
diff --git a/chrome/browser/link_to_text/ui_bundled/link_to_text_mediator_unittest.mm b/chrome/browser/link_to_text/ui_bundled/link_to_text_mediator_unittest.mm
index c170b96..db4d582 100644
--- a/chrome/browser/link_to_text/ui_bundled/link_to_text_mediator_unittest.mm
+++ b/chrome/browser/link_to_text/ui_bundled/link_to_text_mediator_unittest.mm
@@ -224,8 +224,8 @@
EXPECT_FALSE([mediator_ shouldOfferLinkToText]);
}
-// Tests that the shareHighlight command is triggered with the right parameters
-// when the view is not zoomed in.
+// Tests that the `-showShareSheetForHighlight:` command is triggered with the
+// right parameters when the view is not zoomed in.
TEST_F(LinkToTextMediatorTest, HandleLinkToTextSelectionTriggersCommandNoZoom) {
base::HistogramTester histogram_tester;
@@ -240,8 +240,8 @@
__block BOOL callback_invoked = NO;
[[mocked_activity_service_commands_ expect]
- shareHighlight:[OCMArg checkWithBlock:^BOOL(
- ShareHighlightCommand* command) {
+ showShareSheetForHighlight:[OCMArg checkWithBlock:^BOOL(
+ ShareHighlightCommand* command) {
EXPECT_TRUE(kTestHighlightURL == command.URL);
EXPECT_EQ(kTestQuote, base::SysNSStringToUTF8(command.selectedText));
EXPECT_EQ(fake_view_, command.sourceView);
@@ -269,8 +269,8 @@
"SharedHighlights.LinkGenerated.TimeToGenerate", 1);
}
-// Tests that the shareHighlight command is triggered with the right parameters
-// when the current view is zoomed in.
+// Tests that the `-showShareSheetForHighlight:` command is triggered with the
+// right parameters when the current view is zoomed in.
TEST_F(LinkToTextMediatorTest,
HandleLinkToTextSelectionTriggersCommandWithZoom) {
base::HistogramTester histogram_tester;
@@ -286,8 +286,8 @@
__block BOOL callback_invoked = NO;
[[mocked_activity_service_commands_ expect]
- shareHighlight:[OCMArg checkWithBlock:^BOOL(
- ShareHighlightCommand* command) {
+ showShareSheetForHighlight:[OCMArg checkWithBlock:^BOOL(
+ ShareHighlightCommand* command) {
EXPECT_TRUE(kTestHighlightURL == command.URL);
EXPECT_EQ(kTestQuote, base::SysNSStringToUTF8(command.selectedText));
EXPECT_EQ(fake_view_, command.sourceView);
@@ -540,8 +540,8 @@
__block BOOL callback_invoked = NO;
[[mocked_activity_service_commands_ expect]
- shareHighlight:[OCMArg checkWithBlock:^BOOL(
- ShareHighlightCommand* command) {
+ showShareSheetForHighlight:[OCMArg checkWithBlock:^BOOL(
+ ShareHighlightCommand* command) {
EXPECT_TRUE(command.URL.is_valid());
EXPECT_TRUE(GURL(canonical_url).EqualsIgnoringRef(command.URL));
callback_invoked = YES;
@@ -578,8 +578,8 @@
__block BOOL callback_invoked = NO;
[[mocked_activity_service_commands_ expect]
- shareHighlight:[OCMArg checkWithBlock:^BOOL(
- ShareHighlightCommand* command) {
+ showShareSheetForHighlight:[OCMArg checkWithBlock:^BOOL(
+ ShareHighlightCommand* command) {
EXPECT_TRUE(command.URL.is_valid());
EXPECT_TRUE(new_base_url.EqualsIgnoringRef(command.URL));
callback_invoked = YES;
diff --git a/chrome/browser/location_bar/ui_bundled/location_bar_view_controller.mm b/chrome/browser/location_bar/ui_bundled/location_bar_view_controller.mm
index d6acc15..d0555ad 100644
--- a/chrome/browser/location_bar/ui_bundled/location_bar_view_controller.mm
+++ b/chrome/browser/location_bar/ui_bundled/location_bar_view_controller.mm
@@ -640,7 +640,7 @@
case kShareButton: {
[self.locationBarSteadyView.trailingButton
addTarget:self.dispatcher
- action:@selector(sharePage)
+ action:@selector(showShareSheet)
forControlEvents:UIControlEventTouchUpInside];
// Add self as a target to collect the metrics.
diff --git a/chrome/browser/price_notifications/ui_bundled/price_notifications_price_tracking_mediator.mm b/chrome/browser/price_notifications/ui_bundled/price_notifications_price_tracking_mediator.mm
index a999f43..da8eb4f 100644
--- a/chrome/browser/price_notifications/ui_bundled/price_notifications_price_tracking_mediator.mm
+++ b/chrome/browser/price_notifications/ui_bundled/price_notifications_price_tracking_mediator.mm
@@ -177,7 +177,7 @@
- (void)navigateToBookmarks {
[self.handler hidePriceNotifications];
GURL URL = _webState->GetLastCommittedURL();
- [self.bookmarksHandler openToExternalBookmark:URL];
+ [self.bookmarksHandler showBookmarkInBookmarksUI:URL];
}
#pragma mark - PriceInsightsMutator
diff --git a/chrome/browser/promos_manager/ui_bundled/promos_manager_scene_agent.mm b/chrome/browser/promos_manager/ui_bundled/promos_manager_scene_agent.mm
index 8517dac..55c63be 100644
--- a/chrome/browser/promos_manager/ui_bundled/promos_manager_scene_agent.mm
+++ b/chrome/browser/promos_manager/ui_bundled/promos_manager_scene_agent.mm
@@ -76,7 +76,7 @@
id<PromosManagerCommands> promosManagerHandler =
HandlerForProtocol(self.dispatcher, PromosManagerCommands);
- [promosManagerHandler maybeDisplayPromo];
+ [promosManagerHandler showPromo];
}
}
diff --git a/chrome/browser/shared/coordinator/scene/scene_controller.mm b/chrome/browser/shared/coordinator/scene/scene_controller.mm
index d543793..2e11802 100644
--- a/chrome/browser/shared/coordinator/scene/scene_controller.mm
+++ b/chrome/browser/shared/coordinator/scene/scene_controller.mm
@@ -3029,7 +3029,7 @@
id<BookmarksCommands> bookmarksCommandsHandler = HandlerForProtocol(
self.currentInterface.browser->GetCommandDispatcher(), BookmarksCommands);
- [bookmarksCommandsHandler bulkCreateBookmarksWithURLs:URLs];
+ [bookmarksCommandsHandler addBookmarks:URLs];
}
- (void)addReadingListItems:(NSArray<NSURL*>*)URLs {
diff --git a/chrome/browser/shared/public/commands/activity_service_commands.h b/chrome/browser/shared/public/commands/activity_service_commands.h
index c140b9d..fc889ec 100644
--- a/chrome/browser/shared/public/commands/activity_service_commands.h
+++ b/chrome/browser/shared/public/commands/activity_service_commands.h
@@ -16,16 +16,16 @@
- (void)stopAndStartSharingCoordinator;
// Shows the share sheet for the current page.
-- (void)sharePage;
+- (void)showShareSheet;
// Shows the share sheet for a link to the Chrome App in the App Store.
-- (void)shareChromeApp;
+- (void)showShareSheetForChromeApp;
// Shows the share sheet for the page and currently highlighted text.
-- (void)shareHighlight:(ShareHighlightCommand*)command;
+- (void)showShareSheetForHighlight:(ShareHighlightCommand*)command;
// Shows the share sheet for the URL sharing flow for the given command.
-- (void)shareURLFromContextMenu:(ActivityServiceShareURLCommand*)command;
+- (void)showShareSheetForURL:(ActivityServiceShareURLCommand*)command;
@end
diff --git a/chrome/browser/shared/public/commands/bookmarks_commands.h b/chrome/browser/shared/public/commands/bookmarks_commands.h
index fec8b5a..851e580 100644
--- a/chrome/browser/shared/public/commands/bookmarks_commands.h
+++ b/chrome/browser/shared/public/commands/bookmarks_commands.h
@@ -21,26 +21,26 @@
// Adds bookmarks for the given list of URLs.
// The user will be prompted to choose a location to store the bookmarks.
-- (void)bookmarkWithFolderChooser:(NSArray<URLWithTitle*>*)URLs;
+- (void)addBookmarksAndShowFolderChooser:(NSArray<URLWithTitle*>*)URLs;
// Adds bookmark for the last committed URL, and tab title.
-// Behaves as `-(void)bookmark:(URLWithTitle*)` otherwise.
-- (void)bookmarkWithWebState:(web::WebState*)webState;
+// Behaves as `-(void)addOrEditBookmark:(URLWithTitle*)` otherwise.
+- (void)addBookmarkForWebState:(web::WebState*)webState;
// Bulk adds passed URLs to bookmarks. Toasts the amount of successfully added
// bookmarks with a button to view bookmarks. Does not add invalid URLs or
// already existing ones into the model.
-- (void)bulkCreateBookmarksWithURLs:(NSArray<NSURL*>*)URLs;
+- (void)addBookmarks:(NSArray<NSURL*>*)URLs;
// Adds bookmark for the URL.
// - If it is already bookmarked, the "edit bookmark" flow will begin.
// - If it is not already bookmarked, it will be bookmarked automatically and an
// "Edit" button will be provided in the displayed snackbar message.
-- (void)createOrEditBookmarkWithURL:(URLWithTitle*)URLWithTitle;
+- (void)addOrEditBookmark:(URLWithTitle*)URLWithTitle;
// Opens the Bookmarks UI in edit mode and selects the bookmark node
// corresponding to `URL`.
-- (void)openToExternalBookmark:(GURL)URL;
+- (void)showBookmarkInBookmarksUI:(GURL)URL;
@end
diff --git a/chrome/browser/shared/public/commands/contextual_panel_entrypoint_commands.h b/chrome/browser/shared/public/commands/contextual_panel_entrypoint_commands.h
index 972ca41..749976e 100644
--- a/chrome/browser/shared/public/commands/contextual_panel_entrypoint_commands.h
+++ b/chrome/browser/shared/public/commands/contextual_panel_entrypoint_commands.h
@@ -10,7 +10,7 @@
// Notifies the Contextual Panel Entrypoint that the IPH (in-product help) was
// dismissed.
-- (void)contextualPanelEntrypointIPHWasDismissed;
+- (void)notifyContextualPanelEntrypointIPHDismissed;
@end
diff --git a/chrome/browser/shared/public/commands/contextual_panel_entrypoint_iph_commands.h b/chrome/browser/shared/public/commands/contextual_panel_entrypoint_iph_commands.h
index de3c455..88416f6 100644
--- a/chrome/browser/shared/public/commands/contextual_panel_entrypoint_iph_commands.h
+++ b/chrome/browser/shared/public/commands/contextual_panel_entrypoint_iph_commands.h
@@ -12,14 +12,16 @@
// Commands for the Contextual Panel Entrypoint's IPH.
@protocol ContextualPanelEntrypointIPHCommands
-// Tries to show the Contextual Panel entrypoint's IPH, and returns the result.
-- (BOOL)maybeShowContextualPanelEntrypointIPHWithConfig:
+// Shows the Contextual Panel entrypoint's IPH, and returns YES if the IPH was
+// actually shown.
+- (BOOL)showContextualPanelEntrypointIPHWithConfig:
(ContextualPanelItemConfiguration*)config
- anchorPoint:(CGPoint)anchorPoint
- isBottomOmnibox:(BOOL)isBottomOmnibox;
+ anchorPoint:(CGPoint)anchorPoint
+ isBottomOmnibox:(BOOL)isBottomOmnibox;
-// Dismisses the Contextual Panel entrypoint's IPH.
-- (void)dismissContextualPanelEntrypointIPHAnimated:(BOOL)animated;
+// Dismisses the Contextual Panel entrypoint's IPH. (`animated` is YES to
+// animate the dismissal, NO to dismiss immediately.)
+- (void)dismissContextualPanelEntrypointIPH:(BOOL)animated;
@end
diff --git a/chrome/browser/shared/public/commands/promos_manager_commands.h b/chrome/browser/shared/public/commands/promos_manager_commands.h
index f33625c..7cd8ef8 100644
--- a/chrome/browser/shared/public/commands/promos_manager_commands.h
+++ b/chrome/browser/shared/public/commands/promos_manager_commands.h
@@ -13,10 +13,10 @@
@protocol PromosManagerCommands <NSObject>
// Displays an eligible promo (selected by the Promos Manager) if one exists.
-- (void)maybeDisplayPromo;
+- (void)showPromo;
// Makes a request to Apple to present the user the App Store Rating Promo.
-- (void)requestAppStoreReview;
+- (void)showAppStoreReviewPrompt;
// Asks the presenter to display the signin UI configured by `command`.
- (void)showSignin:(ShowSigninCommand*)command;
@@ -25,10 +25,10 @@
- (void)showWhatsNewPromo;
// Display default browser promo.
-- (void)maybeDisplayDefaultBrowserPromo;
+- (void)showDefaultBrowserPromo;
-// Display the default browser promo after the user tapped Remind Me Later.
-- (void)displayDefaultBrowserPromoAfterRemindMeLater;
+// Shows the default browser promo after the user tapped Remind Me Later.
+- (void)showDefaultBrowserPromoAfterRemindMeLater;
@end
diff --git a/chrome/browser/shared/public/commands/qr_generation_commands.h b/chrome/browser/shared/public/commands/qr_generation_commands.h
index cd1d2aa..ef42981 100644
--- a/chrome/browser/shared/public/commands/qr_generation_commands.h
+++ b/chrome/browser/shared/public/commands/qr_generation_commands.h
@@ -11,7 +11,7 @@
@protocol QRGenerationCommands <NSObject>
// Generates a QR code based on the `command` properties and displays it.
-- (void)generateQRCode:(GenerateQRCodeCommand*)command;
+- (void)showQRCode:(GenerateQRCodeCommand*)command;
// Dismisses the view showing a QR code, if present.
- (void)hideQRCode;
diff --git a/chrome/browser/sharing/ui_bundled/activity_services/activities/bookmark_activity.mm b/chrome/browser/sharing/ui_bundled/activity_services/activities/bookmark_activity.mm
index e853ccf..2716b29 100644
--- a/chrome/browser/sharing/ui_bundled/activity_services/activities/bookmark_activity.mm
+++ b/chrome/browser/sharing/ui_bundled/activity_services/activities/bookmark_activity.mm
@@ -95,9 +95,9 @@
// presented by the bookmark command below.
[self activityDidFinish:YES];
- [self.handler createOrEditBookmarkWithURL:[[URLWithTitle alloc]
- initWithURL:self.URL
- title:self.title]];
+ [self.handler
+ addOrEditBookmark:[[URLWithTitle alloc] initWithURL:self.URL
+ title:self.title]];
}
#pragma mark - Private
diff --git a/chrome/browser/sharing/ui_bundled/activity_services/activities/bookmark_activity_unittest.mm b/chrome/browser/sharing/ui_bundled/activity_services/activities/bookmark_activity_unittest.mm
index 1bf3f9e..16fc1fa 100644
--- a/chrome/browser/sharing/ui_bundled/activity_services/activities/bookmark_activity_unittest.mm
+++ b/chrome/browser/sharing/ui_bundled/activity_services/activities/bookmark_activity_unittest.mm
@@ -118,12 +118,11 @@
BookmarkActivity* activity = CreateActivity(testUrl);
[[mocked_handler_ expect]
- createOrEditBookmarkWithURL:[OCMArg
- checkWithBlock:^BOOL(URLWithTitle* URL) {
- EXPECT_EQ(testUrl, URL.URL);
- EXPECT_EQ(kTestTitle, URL.title);
- return YES;
- }]];
+ addOrEditBookmark:[OCMArg checkWithBlock:^BOOL(URLWithTitle* URL) {
+ EXPECT_EQ(testUrl, URL.URL);
+ EXPECT_EQ(kTestTitle, URL.title);
+ return YES;
+ }]];
id activity_partial_mock = OCMPartialMock(activity);
[[activity_partial_mock expect] activityDidFinish:YES];
diff --git a/chrome/browser/sharing/ui_bundled/activity_services/activities/generate_qr_code_activity.mm b/chrome/browser/sharing/ui_bundled/activity_services/activities/generate_qr_code_activity.mm
index 2b4ff41..934bdaf 100644
--- a/chrome/browser/sharing/ui_bundled/activity_services/activities/generate_qr_code_activity.mm
+++ b/chrome/browser/sharing/ui_bundled/activity_services/activities/generate_qr_code_activity.mm
@@ -62,8 +62,8 @@
- (void)performActivity {
[self activityDidFinish:YES];
[self.handler
- generateQRCode:[[GenerateQRCodeCommand alloc] initWithURL:_activityURL
- title:self.title]];
+ showQRCode:[[GenerateQRCodeCommand alloc] initWithURL:_activityURL
+ title:self.title]];
}
@end
diff --git a/chrome/browser/sharing/ui_bundled/activity_services/activities/generate_qr_code_activity_unittest.mm b/chrome/browser/sharing/ui_bundled/activity_services/activities/generate_qr_code_activity_unittest.mm
index 190a2ca..47d6e7a 100644
--- a/chrome/browser/sharing/ui_bundled/activity_services/activities/generate_qr_code_activity_unittest.mm
+++ b/chrome/browser/sharing/ui_bundled/activity_services/activities/generate_qr_code_activity_unittest.mm
@@ -56,12 +56,11 @@
__block NSString* fakeTitle = @"fake title";
[[mocked_handler_ expect]
- generateQRCode:[OCMArg
- checkWithBlock:^BOOL(GenerateQRCodeCommand* value) {
- EXPECT_EQ(fakeURL, value.URL);
- EXPECT_EQ(fakeTitle, value.title);
- return YES;
- }]];
+ showQRCode:[OCMArg checkWithBlock:^BOOL(GenerateQRCodeCommand* value) {
+ EXPECT_EQ(fakeURL, value.URL);
+ EXPECT_EQ(fakeTitle, value.title);
+ return YES;
+ }]];
GenerateQrCodeActivity* activity =
[[GenerateQrCodeActivity alloc] initWithURL:fakeURL
diff --git a/chrome/browser/sharing/ui_bundled/activity_services/activity_service_controller_egtest.mm b/chrome/browser/sharing/ui_bundled/activity_services/activity_service_controller_egtest.mm
index 0d88b44..763bbc6 100644
--- a/chrome/browser/sharing/ui_bundled/activity_services/activity_service_controller_egtest.mm
+++ b/chrome/browser/sharing/ui_bundled/activity_services/activity_service_controller_egtest.mm
@@ -89,7 +89,7 @@
}
// Verifies that Tools Menu > Share Chrome brings up the "share sheet".
-- (void)testShareChromeApp {
+- (void)testShowShareSheetForChromeApp {
[ChromeEarlGreyUI openToolsMenu];
[ChromeEarlGreyUI
tapToolsMenuAction:grey_accessibilityID(kToolsMenuShareChromeId)];
diff --git a/chrome/browser/sharing/ui_bundled/sharing_coordinator.mm b/chrome/browser/sharing/ui_bundled/sharing_coordinator.mm
index d066bdd..d4e6333 100644
--- a/chrome/browser/sharing/ui_bundled/sharing_coordinator.mm
+++ b/chrome/browser/sharing/ui_bundled/sharing_coordinator.mm
@@ -289,7 +289,7 @@
#pragma mark - QRGenerationCommands
-- (void)generateQRCode:(GenerateQRCodeCommand*)command {
+- (void)showQRCode:(GenerateQRCodeCommand*)command {
self.qrGeneratorCoordinator = [[QRGeneratorCoordinator alloc]
initWithBaseViewController:self.baseViewController
browser:self.browser
diff --git a/chrome/browser/sharing/ui_bundled/sharing_coordinator_unittest.mm b/chrome/browser/sharing/ui_bundled/sharing_coordinator_unittest.mm
index d54c001..58d2dc3 100644
--- a/chrome/browser/sharing/ui_bundled/sharing_coordinator_unittest.mm
+++ b/chrome/browser/sharing/ui_bundled/sharing_coordinator_unittest.mm
@@ -174,9 +174,9 @@
completion:nil];
auto handler = static_cast<id<QRGenerationCommands>>(coordinator);
- [handler generateQRCode:[[GenerateQRCodeCommand alloc]
- initWithURL:GURL("https://example.com")
- title:@"Some Title"]];
+ [handler showQRCode:[[GenerateQRCodeCommand alloc]
+ initWithURL:GURL("https://example.com")
+ title:@"Some Title"]];
EXPECT_OCMOCK_VERIFY(vc_partial_mock);
diff --git a/chrome/browser/tab_switcher/ui_bundled/tab_grid/grid/base_grid_mediator.mm b/chrome/browser/tab_switcher/ui_bundled/tab_grid/grid/base_grid_mediator.mm
index 23324a0..d2492c6 100644
--- a/chrome/browser/tab_switcher/ui_bundled/tab_grid/grid/base_grid_mediator.mm
+++ b/chrome/browser/tab_switcher/ui_bundled/tab_grid/grid/base_grid_mediator.mm
@@ -1545,7 +1545,7 @@
NSArray<URLWithTitle*>* URLs = [self urlsWithTitleFromItemIDs:itemIDs];
- [bookmarkHandler bookmarkWithFolderChooser:URLs];
+ [bookmarkHandler addBookmarksAndShowFolderChooser:URLs];
}
- (NSArray<URLWithTitle*>*)urlsWithTitleFromItemIDs:
diff --git a/chrome/browser/toolbar/ui_bundled/buttons/toolbar_button_actions_handler.mm b/chrome/browser/toolbar/ui_bundled/buttons/toolbar_button_actions_handler.mm
index b6baa58..767ee0f 100644
--- a/chrome/browser/toolbar/ui_bundled/buttons/toolbar_button_actions_handler.mm
+++ b/chrome/browser/toolbar/ui_bundled/buttons/toolbar_button_actions_handler.mm
@@ -57,7 +57,7 @@
}
- (void)shareAction {
- [self.activityHandler sharePage];
+ [self.activityHandler showShareSheet];
}
- (void)reloadAction {
diff --git a/chrome/browser/ui/popup_menu/overflow_menu/overflow_menu_mediator.mm b/chrome/browser/ui/popup_menu/overflow_menu/overflow_menu_mediator.mm
index 7b21044..3c10291 100644
--- a/chrome/browser/ui/popup_menu/overflow_menu/overflow_menu_mediator.mm
+++ b/chrome/browser/ui/popup_menu/overflow_menu/overflow_menu_mediator.mm
@@ -672,7 +672,7 @@
accessibilityID:kToolsMenuShareChromeId
hideItemText:nil
handler:^{
- [weakSelf shareChromeApp];
+ [weakSelf showShareSheetForChromeApp];
}];
self.editActionsAction = [self
@@ -2155,7 +2155,7 @@
if (!currentWebState) {
return;
}
- [self.bookmarksHandler bookmarkWithWebState:currentWebState];
+ [self.bookmarksHandler addBookmarkForWebState:currentWebState];
}
// Dismisses the menu and adds the current page to the reading list.
@@ -2289,9 +2289,9 @@
}
// Dismisses the menu and opens share sheet to share Chrome's app store link
-- (void)shareChromeApp {
+- (void)showShareSheetForChromeApp {
[self dismissMenu];
- [self.activityServiceHandler shareChromeApp];
+ [self.activityServiceHandler showShareSheetForChromeApp];
}
// Dismisses the menu and opens history.
diff --git a/chrome/browser/ui/popup_menu/popup_menu_action_handler.mm b/chrome/browser/ui/popup_menu/popup_menu_action_handler.mm
index 7d98183..95aa90c 100644
--- a/chrome/browser/ui/popup_menu/popup_menu_action_handler.mm
+++ b/chrome/browser/ui/popup_menu/popup_menu_action_handler.mm
@@ -81,7 +81,7 @@
if (!currentWebState) {
return;
}
- [self.bookmarksCommandsHandler bookmarkWithWebState:currentWebState];
+ [self.bookmarksCommandsHandler addBookmarkForWebState:currentWebState];
break;
}
case PopupMenuActionTranslate: