Commit 678bfd74 authored by Stepan Khapugin's avatar Stepan Khapugin Committed by Commit Bot

Use proper "tab opening" type.

Use ApplicationModeForTabOpening. It seems to be the intention,
but the type system was confused and allowed to use an incorrect type.

Change-Id: Ifdb8f2e7ce3daa346889ba63600c3c8d6402c231
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1950997
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727561}
parent ecaa9d18
......@@ -152,6 +152,7 @@ source_set("application_delegate_internal") {
"CoreSpotlight.framework",
"UIKit.framework",
]
allow_circular_includes_from = [ "//ios/chrome/browser/url_loading" ]
}
source_set("test_support") {
......
......@@ -9,6 +9,7 @@
#import <UIKit/UIKit.h>
#include "base/ios/block_types.h"
#import "ios/chrome/app/application_delegate/tab_opening.h"
#include "ios/chrome/app/application_mode.h"
#include "ui/base/page_transition_types.h"
......@@ -37,7 +38,7 @@ class ChromeBrowserState;
// If the current tab in |targetMode| is a NTP, it can be reused to open URL.
// |completion| is executed after the tab is opened. After Tab is open the
// virtual URL is set to the pending navigation item.
- (void)openSelectedTabInMode:(ApplicationMode)targetMode
- (void)openSelectedTabInMode:(ApplicationModeForTabOpening)targetMode
withUrlLoadParams:(const UrlLoadParams&)urlLoadParams
completion:(ProceduralBlock)completion;
......
......@@ -34,9 +34,10 @@ void AppUrlLoadingService::LoadUrlInNewTab(const UrlLoadParams& params) {
if (params.from_chrome) {
[delegate_
dismissModalDialogsWithCompletion:^{
[delegate_ openSelectedTabInMode:ApplicationMode::NORMAL
withUrlLoadParams:saved_params
completion:nil];
[delegate_
openSelectedTabInMode:ApplicationModeForTabOpening::NORMAL
withUrlLoadParams:saved_params
completion:nil];
}
dismissOmnibox:YES];
} else {
......
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