OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_APP_APPLICATION_DELEGATE_TAB_OPENING_H_ |
| 6 #define IOS_CHROME_APP_APPLICATION_DELEGATE_TAB_OPENING_H_ |
| 7 |
| 8 #include "base/ios/block_types.h" |
| 9 #include "ios/chrome/app/application_mode.h" |
| 10 #include "ui/base/page_transition_types.h" |
| 11 |
| 12 @class AppState; |
| 13 @class TabModel; |
| 14 @protocol StartupInformation; |
| 15 class GURL; |
| 16 |
| 17 // Protocol for object that can open new tabs during application launch. |
| 18 @protocol TabOpening<NSObject> |
| 19 |
| 20 // Dismisses any modal view then opens either a normal or incognito tab with |
| 21 // |url|. After opening |url|, run completion |handler| if it is not nil. |
| 22 - (void)dismissModalsAndOpenSelectedTabInMode:(ApplicationMode)targetMode |
| 23 withURL:(const GURL&)url |
| 24 transition:(ui::PageTransition)transition |
| 25 completion:(ProceduralBlock)handler; |
| 26 |
| 27 // Creates a new tab if the launch options are not null. |
| 28 - (void)openTabFromLaunchOptions:(NSDictionary*)launchOptions |
| 29 startupInformation:(id<StartupInformation>)startupInformation |
| 30 appState:(AppState*)appState; |
| 31 |
| 32 // Returns whether an NTP tab should be opened when the specified tabModel is |
| 33 // made current. |
| 34 - (BOOL)shouldOpenNTPTabOnActivationOfTabModel:(TabModel*)tabModel; |
| 35 |
| 36 @end |
| 37 |
| 38 #endif // IOS_CHROME_APP_APPLICATION_DELEGATE_TAB_OPENING_H_ |
OLD | NEW |