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

Unified Diff: ios/chrome/browser/ui/web_contents/web_contents_view_controller.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/browser/ui/web_contents/web_contents_view_controller.mm
diff --git a/ios/chrome/browser/ui/web_contents/web_contents_view_controller.mm b/ios/chrome/browser/ui/web_contents/web_contents_view_controller.mm
deleted file mode 100644
index 89c1d5d9180f375efe10bb935f62b4ddf1791dee..0000000000000000000000000000000000000000
--- a/ios/chrome/browser/ui/web_contents/web_contents_view_controller.mm
+++ /dev/null
@@ -1,56 +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/browser/ui/web_contents/web_contents_view_controller.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
-
-@implementation WebContentsViewController
-
-@synthesize webState = _webState;
-
-- (instancetype)initWithWebState:(web::WebState*)webState {
- if ((self = [super initWithNibName:nil bundle:nil])) {
- DCHECK(webState);
- _webState = webState;
- }
- return self;
-}
-
-- (void)viewDidLoad {
- self.view.backgroundColor = [UIColor colorWithWhite:0.75 alpha:1.0];
-
- UIView* webContentsView = self.webState->GetView();
- webContentsView.translatesAutoresizingMaskIntoConstraints = NO;
- [self.view addSubview:webContentsView];
- [NSLayoutConstraint activateConstraints:@[
- [webContentsView.topAnchor constraintEqualToAnchor:self.view.topAnchor],
- [webContentsView.bottomAnchor
- constraintEqualToAnchor:self.view.bottomAnchor],
- [webContentsView.leadingAnchor
- constraintEqualToAnchor:self.view.leadingAnchor],
- [webContentsView.trailingAnchor
- constraintEqualToAnchor:self.view.trailingAnchor],
- ]];
-
- if (!self.webState->GetNavigationManager()->GetItemCount()) {
- web::NavigationManager::WebLoadParams params(
- GURL("https://dev.chromium.org/"));
- params.transition_type = ui::PAGE_TRANSITION_TYPED;
- _webState->GetNavigationManager()->LoadURLWithParams(params);
- }
-}
-
-@end

Powered by Google App Engine
This is Rietveld 408576698