Chromium Code Reviews| Index: ios/clean/chrome/browser/ui/ntp/new_tab_page_home_mediator.mm |
| diff --git a/ios/clean/chrome/browser/ui/ntp/new_tab_page_home_mediator.mm b/ios/clean/chrome/browser/ui/ntp/new_tab_page_home_mediator.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a7ee399650ae9ae0aaa0b7a17746d592ce802a17 |
| --- /dev/null |
| +++ b/ios/clean/chrome/browser/ui/ntp/new_tab_page_home_mediator.mm |
| @@ -0,0 +1,70 @@ |
| + |
|
lpromero
2017/04/06 13:01:05
Remove empty line.
justincohen
2017/04/06 18:25:10
Done.
|
| +// 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. |
| + |
| +#import "ios/clean/chrome/browser/ui/ntp/new_tab_page_home_mediator.h" |
| + |
| +#import "ios/web/public/navigation_manager.h" |
| +#include "ios/web/public/web_state/web_state.h" |
| +#include "ui/base/page_transition_types.h" |
| +#include "url/gurl.h" |
| + |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| +@interface NTPHomeMediator () |
| +@end |
| + |
| +@implementation NTPHomeMediator |
| +@synthesize webState = _webState; |
| + |
| +#pragma mark - UrlLoader |
| + |
| +- (void)loadURL:(const GURL&)url |
| + referrer:(const web::Referrer&)referrer |
| + transition:(ui::PageTransition)transition |
| + rendererInitiated:(BOOL)rendererInitiated { |
| + web::NavigationManager::WebLoadParams params(url); |
| + params.transition_type = transition; |
| + self.webState->GetNavigationManager()->LoadURLWithParams(params); |
|
marq (ping after 24h)
2017/04/06 14:30:14
I don't think we want to plumb the webstate down t
justincohen
2017/04/06 18:25:10
Moved to a dispatcher and a TabCommand.
|
| +} |
| + |
| +- (void)webPageOrderedOpen:(const GURL&)url |
| + referrer:(const web::Referrer&)referrer |
| + inBackground:(BOOL)inBackground |
| + appendTo:(OpenPosition)appendTo { |
| +} |
| + |
| +- (void)webPageOrderedOpen:(const GURL&)url |
| + referrer:(const web::Referrer&)referrer |
| + inIncognito:(BOOL)inIncognito |
| + inBackground:(BOOL)inBackground |
| + appendTo:(OpenPosition)appendTo { |
| +} |
| + |
| +- (void)loadSessionTab:(const sessions::SessionTab*)sessionTab { |
| +} |
| + |
| +- (void)loadJavaScriptFromLocationBar:(NSString*)script { |
| +} |
| + |
| +#pragma mark - OmniboxFocuser |
| + |
| +- (void)focusOmnibox { |
| +} |
| + |
| +- (void)cancelOmniboxEdit { |
| +} |
| + |
| +- (void)focusFakebox { |
| +} |
| + |
| +- (void)onFakeboxBlur { |
| +} |
| + |
| +- (void)onFakeboxAnimationComplete { |
| +} |
| + |
| +@end |