Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: ios/chrome/app/steps/launch_to_foreground.mm

Issue 2592983003: [Clean Skeleton] Migrate code to clean/ (Closed)
Patch Set: Rebased Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/app/steps/launch_to_foreground.mm
diff --git a/ios/chrome/app/steps/launch_to_foreground.mm b/ios/chrome/app/steps/launch_to_foreground.mm
deleted file mode 100644
index 4ec0b58cbbf46dad11133d94a29f42d0ee49a265..0000000000000000000000000000000000000000
--- a/ios/chrome/app/steps/launch_to_foreground.mm
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2016 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.
-
-// ====== New Architecture =====
-// = This code is only used in the new iOS Chrome architecture. =
-// ============================================================================
-
-#import "ios/chrome/app/steps/launch_to_foreground.h"
-
-#include "components/content_settings/core/browser/host_content_settings_map.h"
-#include "ios/chrome/app/application_state.h"
-#include "ios/chrome/browser/application_context.h"
-#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
-#include "ios/chrome/browser/content_settings/host_content_settings_map_factory.h"
-#include "ios/web/public/web_capabilities.h"
-#include "ios/web/public/web_thread.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-// Temporary class to trigger URL-opening events from a shake gesture.
-@interface ShakeCatchingWindow : UIWindow
-@end
-
-@implementation BeginForegrounding
-
-- (BOOL)canRunInState:(ApplicationState*)state {
- return state.phase == APPLICATION_BACKGROUNDED;
-}
-
-- (void)runInState:(ApplicationState*)state {
- GetApplicationContext()->OnAppEnterForeground();
-}
-
-@end
-
-@implementation PrepareForUI
-
-- (BOOL)canRunInState:(ApplicationState*)state {
- return state.phase == APPLICATION_BACKGROUNDED;
-}
-
-- (void)runInState:(ApplicationState*)state {
- state.window =
- [[ShakeCatchingWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
- [state.window makeKeyWindow];
-}
-
-@end
-
-@implementation CompleteForegrounding
-- (BOOL)canRunInState:(ApplicationState*)state {
- return state.window.keyWindow && state.phase == APPLICATION_BACKGROUNDED;
-}
-
-- (void)runInState:(ApplicationState*)state {
- state.phase = APPLICATION_FOREGROUNDED;
-}
-
-@end
-
-@implementation ShakeCatchingWindow
-
-#pragma mark - UIResponder
-
-- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent*)event {
- if (motion == UIEventSubtypeMotionShake) {
- UIApplication* app = [UIApplication sharedApplication];
- [app.delegate application:app
- openURL:[NSURL URLWithString:@"https://www.google.com"]
- options:@{}];
- }
- [super motionEnded:motion withEvent:event];
-}
-
-@end
« no previous file with comments | « ios/chrome/app/steps/launch_to_foreground.h ('k') | ios/chrome/app/steps/tab_grid_coordinator+application_step.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698