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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 7552026: Convert ToolbarModel::GetEVCertName() from wstring to string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 // Switch from location icon to keyword mode. 613 // Switch from location icon to keyword mode.
614 location_icon_decoration_->SetVisible(false); 614 location_icon_decoration_->SetVisible(false);
615 selected_keyword_decoration_->SetVisible(true); 615 selected_keyword_decoration_->SetVisible(true);
616 selected_keyword_decoration_->SetKeyword(short_name, is_extension_keyword); 616 selected_keyword_decoration_->SetKeyword(short_name, is_extension_keyword);
617 selected_keyword_decoration_->SetImage(GetKeywordImage(keyword)); 617 selected_keyword_decoration_->SetImage(GetKeywordImage(keyword));
618 } else if (toolbar_model_->GetSecurityLevel() == ToolbarModel::EV_SECURE) { 618 } else if (toolbar_model_->GetSecurityLevel() == ToolbarModel::EV_SECURE) {
619 // Switch from location icon to show the EV bubble instead. 619 // Switch from location icon to show the EV bubble instead.
620 location_icon_decoration_->SetVisible(false); 620 location_icon_decoration_->SetVisible(false);
621 ev_bubble_decoration_->SetVisible(true); 621 ev_bubble_decoration_->SetVisible(true);
622 622
623 std::wstring label(toolbar_model_->GetEVCertName()); 623 string16 label(toolbar_model_->GetEVCertName());
624 ev_bubble_decoration_->SetFullLabel(base::SysWideToNSString(label)); 624 ev_bubble_decoration_->SetFullLabel(base::SysUTF16ToNSString(label));
625 } else if (!keyword.empty() && is_keyword_hint) { 625 } else if (!keyword.empty() && is_keyword_hint) {
626 keyword_hint_decoration_->SetKeyword(short_name, 626 keyword_hint_decoration_->SetKeyword(short_name,
627 is_extension_keyword); 627 is_extension_keyword);
628 keyword_hint_decoration_->SetVisible(true); 628 keyword_hint_decoration_->SetVisible(true);
629 } 629 }
630 630
631 // These need to change anytime the layout changes. 631 // These need to change anytime the layout changes.
632 // TODO(shess): Anytime the field editor might have changed, the 632 // TODO(shess): Anytime the field editor might have changed, the
633 // cursor rects almost certainly should have changed. The tooltips 633 // cursor rects almost certainly should have changed. The tooltips
634 // might change even when the rects don't change. 634 // might change even when the rects don't change.
635 [field_ resetFieldEditorFrameIfNeeded]; 635 [field_ resetFieldEditorFrameIfNeeded];
636 [field_ updateCursorAndToolTipRects]; 636 [field_ updateCursorAndToolTipRects];
637 637
638 [field_ setNeedsDisplay:YES]; 638 [field_ setNeedsDisplay:YES];
639 } 639 }
640 640
641 bool LocationBarViewMac::IsStarEnabled() { 641 bool LocationBarViewMac::IsStarEnabled() {
642 return [field_ isEditable] && 642 return [field_ isEditable] &&
643 browser_defaults::bookmarks_enabled && 643 browser_defaults::bookmarks_enabled &&
644 !toolbar_model_->input_in_progress() && 644 !toolbar_model_->input_in_progress() &&
645 edit_bookmarks_enabled_.GetValue(); 645 edit_bookmarks_enabled_.GetValue();
646 } 646 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698