| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #import "chrome/browser/ui/cocoa/passwords/pending_password_view_controller.h" | 7 #import "chrome/browser/ui/cocoa/passwords/pending_password_view_controller.h" |
| 8 | 8 |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| 11 #include "chrome/browser/ui/chrome_style.h" | 11 #include "chrome/browser/ui/chrome_style.h" |
| 12 #import "chrome/browser/ui/cocoa/hover_close_button.h" | 12 #import "chrome/browser/ui/cocoa/hover_close_button.h" |
| 13 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h" | 13 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h" |
| 14 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 14 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
| 15 #include "chrome/grit/generated_resources.h" | 15 #include "chrome/grit/generated_resources.h" |
| 16 #include "skia/ext/skia_utils_mac.h" | 16 #include "skia/ext/skia_utils_mac.h" |
| 17 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" | 17 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" |
| 18 #import "ui/base/cocoa/controls/hyperlink_text_view.h" | 18 #import "ui/base/cocoa/controls/hyperlink_text_view.h" |
| 19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 20 | 20 |
| 21 const SkColor kWarmWelcomeColor = SkColorSetRGB(0x64, 0x64, 0x64); | 21 constexpr SkColor kWarmWelcomeColor = |
| 22 SkColorSetARGBMacro(0xFF, 0x64, 0x64, 0x64); |
| 22 | 23 |
| 23 @implementation PendingPasswordViewController | 24 @implementation PendingPasswordViewController |
| 24 | 25 |
| 25 - (BOOL)textView:(NSTextView*)textView | 26 - (BOOL)textView:(NSTextView*)textView |
| 26 clickedOnLink:(id)link | 27 clickedOnLink:(id)link |
| 27 atIndex:(NSUInteger)charIndex { | 28 atIndex:(NSUInteger)charIndex { |
| 28 ManagePasswordsBubbleModel* model = [self model]; | 29 ManagePasswordsBubbleModel* model = [self model]; |
| 29 if (model) | 30 if (model) |
| 30 model->OnBrandLinkClicked(); | 31 model->OnBrandLinkClicked(); |
| 31 [self.delegate viewShouldDismiss]; | 32 [self.delegate viewShouldDismiss]; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 180 |
| 180 @end | 181 @end |
| 181 | 182 |
| 182 @implementation PendingPasswordViewController (Testing) | 183 @implementation PendingPasswordViewController (Testing) |
| 183 | 184 |
| 184 - (NSButton*)closeButton { | 185 - (NSButton*)closeButton { |
| 185 return closeButton_.get(); | 186 return closeButton_.get(); |
| 186 } | 187 } |
| 187 | 188 |
| 188 @end | 189 @end |
| OLD | NEW |