| Index: chrome/browser/ui/gtk/location_bar_view_gtk.cc
|
| ===================================================================
|
| --- chrome/browser/ui/gtk/location_bar_view_gtk.cc (revision 72383)
|
| +++ chrome/browser/ui/gtk/location_bar_view_gtk.cc (working copy)
|
| @@ -459,7 +459,7 @@
|
| }
|
|
|
| bool LocationBarViewGtk::OnCommitSuggestedText(
|
| - const string16& typed_text) {
|
| + const std::wstring& typed_text) {
|
| return browser_->instant() && location_entry_->CommitInstantSuggestion();
|
| }
|
|
|
| @@ -513,7 +513,7 @@
|
| void LocationBarViewGtk::OnChanged() {
|
| UpdateSiteTypeArea();
|
|
|
| - const string16 keyword(location_entry_->model()->keyword());
|
| + const std::wstring keyword(location_entry_->model()->keyword());
|
| const bool is_keyword_hint = location_entry_->model()->is_keyword_hint();
|
| show_selected_keyword_ = !keyword.empty() && !is_keyword_hint;
|
| show_keyword_hint_ = !keyword.empty() && is_keyword_hint;
|
| @@ -534,17 +534,17 @@
|
| instant->Update(
|
| browser_->GetSelectedTabContentsWrapper(),
|
| location_entry_->model()->CurrentMatch(),
|
| - location_entry_->GetText(),
|
| + WideToUTF16(location_entry_->GetText()),
|
| location_entry_->model()->UseVerbatimInstant(),
|
| &suggested_text);
|
| if (!instant->MightSupportInstant()) {
|
| - location_entry_->model()->FinalizeInstantQuery(string16(),
|
| - string16());
|
| + location_entry_->model()->FinalizeInstantQuery(std::wstring(),
|
| + std::wstring());
|
| }
|
| } else {
|
| instant->DestroyPreviewContents();
|
| - location_entry_->model()->FinalizeInstantQuery(string16(),
|
| - string16());
|
| + location_entry_->model()->FinalizeInstantQuery(std::wstring(),
|
| + std::wstring());
|
| }
|
| }
|
|
|
| @@ -606,8 +606,8 @@
|
| return GetTabContents()->GetFavIcon();
|
| }
|
|
|
| -string16 LocationBarViewGtk::GetTitle() const {
|
| - return GetTabContents()->GetTitle();
|
| +std::wstring LocationBarViewGtk::GetTitle() const {
|
| + return UTF16ToWideHack(GetTabContents()->GetTitle());
|
| }
|
|
|
| void LocationBarViewGtk::ShowFirstRunBubble(FirstRun::BubbleType bubble_type) {
|
| @@ -627,7 +627,8 @@
|
| // text.
|
| if (!text.empty()) {
|
| location_entry_->model()->FinalizeInstantQuery(
|
| - location_entry_->GetText(), text);
|
| + location_entry_->GetText(),
|
| + UTF16ToWide(text));
|
| }
|
| } else {
|
| location_entry_->SetInstantSuggestion(text);
|
| @@ -970,7 +971,7 @@
|
| pango_font_metrics_unref(metrics);
|
| }
|
|
|
| -void LocationBarViewGtk::SetKeywordLabel(const string16& keyword) {
|
| +void LocationBarViewGtk::SetKeywordLabel(const std::wstring& keyword) {
|
| if (keyword.empty())
|
| return;
|
|
|
| @@ -980,7 +981,7 @@
|
|
|
| bool is_extension_keyword;
|
| const string16 short_name = profile_->GetTemplateURLModel()->
|
| - GetKeywordShortName(keyword, &is_extension_keyword);
|
| + GetKeywordShortName(WideToUTF16Hack(keyword), &is_extension_keyword);
|
| int message_id = is_extension_keyword ?
|
| IDS_OMNIBOX_EXTENSION_KEYWORD_TEXT : IDS_OMNIBOX_KEYWORD_TEXT;
|
| string16 full_name = l10n_util::GetStringFUTF16(message_id,
|
| @@ -999,7 +1000,8 @@
|
|
|
| if (is_extension_keyword) {
|
| const TemplateURL* template_url =
|
| - profile_->GetTemplateURLModel()->GetTemplateURLForKeyword(keyword);
|
| + profile_->GetTemplateURLModel()->GetTemplateURLForKeyword(
|
| + WideToUTF16Hack(keyword));
|
| const SkBitmap& bitmap = profile_->GetExtensionService()->
|
| GetOmniboxIcon(template_url->GetExtensionId());
|
| GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&bitmap);
|
| @@ -1013,7 +1015,7 @@
|
| }
|
| }
|
|
|
| -void LocationBarViewGtk::SetKeywordHintLabel(const string16& keyword) {
|
| +void LocationBarViewGtk::SetKeywordHintLabel(const std::wstring& keyword) {
|
| if (keyword.empty())
|
| return;
|
|
|
| @@ -1023,7 +1025,7 @@
|
|
|
| bool is_extension_keyword;
|
| const string16 short_name = profile_->GetTemplateURLModel()->
|
| - GetKeywordShortName(keyword, &is_extension_keyword);
|
| + GetKeywordShortName(WideToUTF16Hack(keyword), &is_extension_keyword);
|
| int message_id = is_extension_keyword ?
|
| IDS_OMNIBOX_EXTENSION_KEYWORD_HINT : IDS_OMNIBOX_KEYWORD_HINT;
|
| std::vector<size_t> content_param_offsets;
|
| @@ -1127,7 +1129,7 @@
|
| if (!pixbuf)
|
| return;
|
| drag_icon_ = bookmark_utils::GetDragRepresentation(pixbuf,
|
| - GetTitle(), theme_provider_);
|
| + WideToUTF16(GetTitle()), theme_provider_);
|
| g_object_unref(pixbuf);
|
| gtk_drag_set_icon_widget(context, drag_icon_, 0, 0);
|
| }
|
|
|
| Property changes on: chrome/browser/ui/gtk/location_bar_view_gtk.cc
|
| ___________________________________________________________________
|
| Added: svn:mergeinfo
|
|
|
|
|