[iOS][Alert] Create buttons with gray highlight

Adds a button that changes its background to gray when highlighted. This
is to be used in the buttons of the new AlertViewController.

Bug: 951358, 951300
Change-Id: Ib76fb1eef38f911de096781050b101997f091b70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578743
Reviewed-by: Mark Cogan <marq@chromium.org>
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Auto-Submit: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653550}
diff --git a/ios/chrome/browser/ui/elements/BUILD.gn b/ios/chrome/browser/ui/elements/BUILD.gn
index 149eb7f..82327f0 100644
--- a/ios/chrome/browser/ui/elements/BUILD.gn
+++ b/ios/chrome/browser/ui/elements/BUILD.gn
@@ -7,6 +7,8 @@
   sources = [
     "extended_touch_target_button.h",
     "extended_touch_target_button.mm",
+    "gray_highlight_button.h",
+    "gray_highlight_button.mm",
     "selector_coordinator.h",
     "selector_coordinator.mm",
     "selector_picker_presentation_controller.h",
diff --git a/ios/chrome/browser/ui/elements/gray_highlight_button.h b/ios/chrome/browser/ui/elements/gray_highlight_button.h
new file mode 100644
index 0000000..7fe81c6b
--- /dev/null
+++ b/ios/chrome/browser/ui/elements/gray_highlight_button.h
@@ -0,0 +1,15 @@
+// Copyright 2019 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.
+
+#ifndef IOS_CHROME_BROWSER_UI_ELEMENTS_GRAY_HIGHLIGHT_BUTTON_H_
+#define IOS_CHROME_BROWSER_UI_ELEMENTS_GRAY_HIGHLIGHT_BUTTON_H_
+
+#import <UIKit/UIKit.h>
+
+// A button that makes its background light gray when highlighted and clear
+// when not. Also its text is not dimmed.
+@interface GrayHighlightButton : UIButton
+@end
+
+#endif  // IOS_CHROME_BROWSER_UI_ELEMENTS_GRAY_HIGHLIGHT_BUTTON_H_
diff --git a/ios/chrome/browser/ui/elements/gray_highlight_button.mm b/ios/chrome/browser/ui/elements/gray_highlight_button.mm
new file mode 100644
index 0000000..c929124
--- /dev/null
+++ b/ios/chrome/browser/ui/elements/gray_highlight_button.mm
@@ -0,0 +1,22 @@
+// Copyright 2019 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.
+
+#import "ios/chrome/browser/ui/elements/gray_highlight_button.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+@implementation GrayHighlightButton
+
+- (void)setHighlighted:(BOOL)highlighted {
+  [super setHighlighted:highlighted];
+  if (highlighted) {
+    self.backgroundColor = [UIColor colorWithWhite:235.0 / 255.0 alpha:1.0];
+  } else {
+    self.backgroundColor = [UIColor clearColor];
+  }
+}
+
+@end