| 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 #import "ios/clean/chrome/app/steps/launch_to_background.h" | 5 #import "ios/clean/chrome/app/steps/launch_to_background.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
| 10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 - (BOOL)canRunInState:(ApplicationState*)state { | 71 - (BOOL)canRunInState:(ApplicationState*)state { |
| 72 return state.phase == APPLICATION_BASIC; | 72 return state.phase == APPLICATION_BASIC; |
| 73 } | 73 } |
| 74 | 74 |
| 75 - (void)runInState:(ApplicationState*)state { | 75 - (void)runInState:(ApplicationState*)state { |
| 76 web::SetWebClient(new ChromeWebClient()); | 76 web::SetWebClient(new ChromeWebClient()); |
| 77 | 77 |
| 78 // Create and persist an IOSChromeMain instance. | 78 // Create and persist an IOSChromeMain instance. |
| 79 state.persistentState->SetUserData( | 79 state.persistentState->SetUserData( |
| 80 kChromeMainKey, | 80 kChromeMainKey, |
| 81 new ChromeMainContainer(base::MakeUnique<IOSChromeMain>())); | 81 base::MakeUnique<ChromeMainContainer>(base::MakeUnique<IOSChromeMain>())); |
| 82 | 82 |
| 83 // Add a step to the termination steps of |state| that will stop and remove | 83 // Add a step to the termination steps of |state| that will stop and remove |
| 84 // the IOSChromeMain instance. | 84 // the IOSChromeMain instance. |
| 85 [[state terminationSteps] addObject:[[StopChromeMain alloc] init]]; | 85 [[state terminationSteps] addObject:[[StopChromeMain alloc] init]]; |
| 86 | 86 |
| 87 state.phase = APPLICATION_BACKGROUNDED; | 87 state.phase = APPLICATION_BACKGROUNDED; |
| 88 } | 88 } |
| 89 | 89 |
| 90 @end | 90 @end |
| 91 | 91 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 118 state.phase == APPLICATION_BACKGROUNDED; | 118 state.phase == APPLICATION_BACKGROUNDED; |
| 119 } | 119 } |
| 120 | 120 |
| 121 - (void)runInState:(ApplicationState*)state { | 121 - (void)runInState:(ApplicationState*)state { |
| 122 state.browserState = GetApplicationContext() | 122 state.browserState = GetApplicationContext() |
| 123 ->GetChromeBrowserStateManager() | 123 ->GetChromeBrowserStateManager() |
| 124 ->GetLastUsedBrowserState(); | 124 ->GetLastUsedBrowserState(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 @end | 127 @end |
| OLD | NEW |