| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/logging.h" | 5 #include "base/logging.h" |
| 6 #import "ios/chrome/app/application_delegate/app_state.h" | 6 #import "ios/chrome/app/application_delegate/app_state.h" |
| 7 #import "ios/chrome/app/chrome_overlay_window.h" | 7 #import "ios/chrome/app/chrome_overlay_window.h" |
| 8 #import "ios/chrome/app/multitasking_test_application_delegate.h" | 8 #import "ios/chrome/app/multitasking_test_application_delegate.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const CGFloat kWidthLandscapeSplitViewOnLargeIPad = 678.0; | 29 const CGFloat kWidthLandscapeSplitViewOnLargeIPad = 678.0; |
| 30 | 30 |
| 31 } // namespace | 31 } // namespace |
| 32 | 32 |
| 33 @implementation MultitaskingTestApplicationDelegate | 33 @implementation MultitaskingTestApplicationDelegate |
| 34 | 34 |
| 35 - (BOOL)application:(UIApplication*)application | 35 - (BOOL)application:(UIApplication*)application |
| 36 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { | 36 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { |
| 37 // Configure application window size for multitasking tests. | 37 // Configure application window size for multitasking tests. |
| 38 CGSize newWindowSize = [self windowSize]; | 38 CGSize newWindowSize = [self windowSize]; |
| 39 self.window = [[[ChromeOverlayWindow alloc] | 39 self.window = [[ChromeOverlayWindow alloc] |
| 40 initWithFrame:CGRectMake(0, 0, newWindowSize.width, newWindowSize.height)] | 40 initWithFrame:CGRectMake(0, 0, newWindowSize.width, |
| 41 autorelease]; | 41 newWindowSize.height)]; |
| 42 | 42 |
| 43 BOOL inBackground = | 43 BOOL inBackground = |
| 44 [application applicationState] == UIApplicationStateBackground; | 44 [application applicationState] == UIApplicationStateBackground; |
| 45 return [[self appState] requiresHandlingAfterLaunchWithOptions:launchOptions | 45 return [[self appState] requiresHandlingAfterLaunchWithOptions:launchOptions |
| 46 stateBackground:inBackground]; | 46 stateBackground:inBackground]; |
| 47 } | 47 } |
| 48 | 48 |
| 49 // Returns true if test is running on 12.9 inch iPad Pro. Otherwise, it's | 49 // Returns true if test is running on 12.9 inch iPad Pro. Otherwise, it's |
| 50 // running on regular iPad. | 50 // running on regular iPad. |
| 51 - (BOOL)isRunningOnLargeIPadPro { | 51 - (BOOL)isRunningOnLargeIPadPro { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 } else { | 88 } else { |
| 89 NOTREACHED() << "Unsupported multitasking test mode. Only " | 89 NOTREACHED() << "Unsupported multitasking test mode. Only " |
| 90 "--enable-slide-over-test-mode and " | 90 "--enable-slide-over-test-mode and " |
| 91 "--enable-split-view-test-mode are supported."; | 91 "--enable-split-view-test-mode are supported."; |
| 92 } | 92 } |
| 93 return size; | 93 return size; |
| 94 } | 94 } |
| 95 | 95 |
| 96 @end | 96 @end |
| OLD | NEW |