| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" | 5 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" |
| 6 | 6 |
| 7 #include <Carbon/Carbon.h> // kVK_Return | 7 #include <Carbon/Carbon.h> // kVK_Return |
| 8 | 8 |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 NSColor* HostTextColor(bool in_dark_mode) { | 99 NSColor* HostTextColor(bool in_dark_mode) { |
| 100 if (!ui::MaterialDesignController::IsModeMaterial()) { | 100 if (!ui::MaterialDesignController::IsModeMaterial()) { |
| 101 return [NSColor blackColor]; | 101 return [NSColor blackColor]; |
| 102 } | 102 } |
| 103 return in_dark_mode ? [NSColor whiteColor] : [NSColor blackColor]; | 103 return in_dark_mode ? [NSColor whiteColor] : [NSColor blackColor]; |
| 104 } | 104 } |
| 105 NSColor* SecureSchemeColor(bool in_dark_mode) { | 105 NSColor* SecureSchemeColor(bool in_dark_mode) { |
| 106 if (!ui::MaterialDesignController::IsModeMaterial()) { | 106 if (!ui::MaterialDesignController::IsModeMaterial()) { |
| 107 return ColorWithRGBBytes(0x07, 0x95, 0x00); | 107 return ColorWithRGBBytes(0x07, 0x95, 0x00); |
| 108 } | 108 } |
| 109 return in_dark_mode | 109 return in_dark_mode ? skia::SkColorToSRGBNSColor(SK_ColorWHITE) |
| 110 ? skia::SkColorToSRGBNSColor(SkColorSetA(SK_ColorWHITE, 0x7F)) | 110 : skia::SkColorToSRGBNSColor(gfx::kGoogleGreen700); |
| 111 : skia::SkColorToSRGBNSColor(gfx::kGoogleGreen700); | |
| 112 } | 111 } |
| 113 NSColor* SecurityWarningSchemeColor(bool in_dark_mode) { | 112 NSColor* SecurityWarningSchemeColor(bool in_dark_mode) { |
| 114 return in_dark_mode | 113 return in_dark_mode |
| 115 ? skia::SkColorToSRGBNSColor(SkColorSetA(SK_ColorWHITE, 0x7F)) | 114 ? skia::SkColorToSRGBNSColor(SkColorSetA(SK_ColorWHITE, 0x7F)) |
| 116 : skia::SkColorToSRGBNSColor(gfx::kGoogleYellow700); | 115 : skia::SkColorToSRGBNSColor(gfx::kGoogleYellow700); |
| 117 } | 116 } |
| 118 NSColor* SecurityErrorSchemeColor(bool in_dark_mode) { | 117 NSColor* SecurityErrorSchemeColor(bool in_dark_mode) { |
| 119 if (!ui::MaterialDesignController::IsModeMaterial()) { | 118 if (!ui::MaterialDesignController::IsModeMaterial()) { |
| 120 return ColorWithRGBBytes(0xa2, 0x00, 0x00); | 119 return ColorWithRGBBytes(0xa2, 0x00, 0x00); |
| 121 } | 120 } |
| (...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 display_text); | 1161 display_text); |
| 1163 NSDictionary* notification_info = @{ | 1162 NSDictionary* notification_info = @{ |
| 1164 NSAccessibilityAnnouncementKey : announcement, | 1163 NSAccessibilityAnnouncementKey : announcement, |
| 1165 NSAccessibilityPriorityKey : @(NSAccessibilityPriorityHigh) | 1164 NSAccessibilityPriorityKey : @(NSAccessibilityPriorityHigh) |
| 1166 }; | 1165 }; |
| 1167 NSAccessibilityPostNotificationWithUserInfo( | 1166 NSAccessibilityPostNotificationWithUserInfo( |
| 1168 [field_ window], | 1167 [field_ window], |
| 1169 NSAccessibilityAnnouncementRequestedNotification, | 1168 NSAccessibilityAnnouncementRequestedNotification, |
| 1170 notification_info); | 1169 notification_info); |
| 1171 } | 1170 } |
| OLD | NEW |