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

Side by Side Diff: ios/chrome/browser/ui/elements/activity_overlay_view_controller.mm

Issue 2588713002: Upstream Chrome on iOS source code [4/11]. (Closed)
Patch Set: Created 3 years, 12 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 unified diff | Download patch
OLDNEW
(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 #import "ios/chrome/browser/ui/elements/activity_overlay_view_controller.h"
6
7 #import "ios/chrome/browser/ui/material_components/activity_indicator.h"
8 #import "ios/chrome/browser/ui/uikit_ui_util.h"
9 #import "ios/third_party/material_components_ios/src/components/ActivityIndicato r/src/MaterialActivityIndicator.h"
10
11 namespace {
12 // Size of the activity indicator.
13 const CGFloat kActivityIndicatorSize = 48;
14 // Alpha of the presented view's background.
15 const CGFloat kBackgroundAlpha = 0.5;
16 }
17
18 @implementation ActivityOverlayViewController
19
20 - (void)viewDidLoad {
21 [super viewDidLoad];
22 self.view.backgroundColor = [UIColor colorWithWhite:0 alpha:kBackgroundAlpha];
23
24 MDCActivityIndicator* activityIndicator = [[[MDCActivityIndicator alloc]
25 initWithFrame:CGRectMake(0, 0, kActivityIndicatorSize,
26 kActivityIndicatorSize)] autorelease];
27 activityIndicator.translatesAutoresizingMaskIntoConstraints = NO;
28 [self.view addSubview:activityIndicator];
29 AddSameCenterConstraints(self.view, activityIndicator);
30 activityIndicator.cycleColors = ActivityIndicatorBrandedCycleColors();
31 [activityIndicator startAnimating];
32 }
33
34 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/elements/activity_overlay_view_controller.h ('k') | ios/chrome/browser/ui/error_page_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698