diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-19 19:01:14 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-19 19:01:14 +0000 |
commit | eed084d901efe457300e673972a0369406bd5e66 (patch) | |
tree | 82f94f52879937ded20a1fc7932bfbc300e408bf /chrome/browser/cocoa/location_bar_view_mac.mm | |
parent | b8f41a197500eb0d6fbff3e8f1216d99a49b7d07 (diff) | |
download | chromium_src-eed084d901efe457300e673972a0369406bd5e66.zip chromium_src-eed084d901efe457300e673972a0369406bd5e66.tar.gz chromium_src-eed084d901efe457300e673972a0369406bd5e66.tar.bz2 |
SSL UI changes, Windows, code side (images are separate).
* Remove "Type to search" hint
* Remove "Untrusted website" label
* Add EV cert bubble, make it function like a location icon for clicks/drags
* Modify spacing for EV/tab-to-search bubbles to keep icons and text aligned with dropdown
* Change non-EV HTTPS coloring from blue to green
Mac and Linux should compile, but only some of the above changes have been made for them. Specifically, there is no EV cert bubble, the non-EV scheme color isn't changed, and the icon/text alignment in the tab-to-search bubble hasn't been touched.
BUG=41481
TEST=paypal.com should generate a bubble around the lock and cert holder name, which responds to clicks and drags like the location icon would
Review URL: http://codereview.chromium.org/1585043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44929 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/location_bar_view_mac.mm')
-rw-r--r-- | chrome/browser/cocoa/location_bar_view_mac.mm | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/chrome/browser/cocoa/location_bar_view_mac.mm b/chrome/browser/cocoa/location_bar_view_mac.mm index ef2ce52..6e33130 100644 --- a/chrome/browser/cocoa/location_bar_view_mac.mm +++ b/chrome/browser/cocoa/location_bar_view_mac.mm @@ -260,7 +260,6 @@ void LocationBarViewMac::OnChangedImpl(AutocompleteTextField* field, const std::wstring& keyword, const std::wstring& short_name, const bool is_keyword_hint, - const bool show_search_hint, NSImage* image) { AutocompleteTextFieldCell* cell = [field autocompleteTextFieldCell]; const CGFloat availableWidth([field availableDecorationWidth]); @@ -306,12 +305,6 @@ void LocationBarViewMac::OnChangedImpl(AutocompleteTextField* field, [cell setKeywordHintPrefix:prefix image:image suffix:suffix availableWidth:availableWidth]; - } else if (show_search_hint) { - // Show a search hint right-justified in the field if there is no - // keyword. - const std::wstring hint(l10n_util::GetString(IDS_OMNIBOX_EMPTY_TEXT)); - [cell setSearchHintString:base::SysWideToNSString(hint) - availableWidth:availableWidth]; } else { // Nothing interesting to show, plain old text field. [cell clearKeywordAndHint]; @@ -338,7 +331,6 @@ void LocationBarViewMac::OnChanged() { keyword, short_name, edit_view_->model()->is_keyword_hint(), - edit_view_->model()->show_search_hint(), GetTabButtonImage()); } @@ -496,27 +488,19 @@ void LocationBarViewMac::SetIcon(int resource_id) { } void LocationBarViewMac::SetSecurityLabel() { - std::wstring security_info_text(toolbar_model_->GetSecurityInfoText()); - if (security_info_text.empty()) { - security_label_view_.SetLabel(nil, nil, nil); - security_label_view_.SetVisible(false); - } else { + if (toolbar_model_->GetSecurityLevel() == ToolbarModel::EV_SECURE) { + std::wstring security_info_text(toolbar_model_->GetEVCertName()); NSString* icon_label = base::SysWideToNSString(security_info_text); - NSColor* color; - if (toolbar_model_->GetSecurityLevel() == ToolbarModel::EV_SECURE) { - color = [NSColor colorWithCalibratedRed:kEVSecureTextColorRedComponent - green:kEVSecureTextColorGreenComponent - blue:kEVSecureTextColorBlueComponent - alpha:1.0]; - } else { - color = - [NSColor colorWithCalibratedRed:kSecurityErrorTextColorRedComponent - green:kSecurityErrorTextColorGreenComponent - blue:kSecurityErrorTextColorBlueComponent - alpha:1.0]; - } + NSColor* color = + [NSColor colorWithCalibratedRed:kEVSecureTextColorRedComponent + green:kEVSecureTextColorGreenComponent + blue:kEVSecureTextColorBlueComponent + alpha:1.0]; security_label_view_.SetLabel(icon_label, [field_ font], color); security_label_view_.SetVisible(true); + } else { + security_label_view_.SetLabel(nil, nil, nil); + security_label_view_.SetVisible(false); } } |