| 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/views/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 omnibox_view_->Init(); | 192 omnibox_view_->Init(); |
| 193 AddChildView(omnibox_view_); | 193 AddChildView(omnibox_view_); |
| 194 | 194 |
| 195 // Initialize the inline autocomplete view which is visible only when IME is | 195 // Initialize the inline autocomplete view which is visible only when IME is |
| 196 // turned on. Use the same font with the omnibox and highlighted background. | 196 // turned on. Use the same font with the omnibox and highlighted background. |
| 197 ime_inline_autocomplete_view_ = | 197 ime_inline_autocomplete_view_ = |
| 198 new views::Label(base::string16(), {font_list}); | 198 new views::Label(base::string16(), {font_list}); |
| 199 ime_inline_autocomplete_view_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 199 ime_inline_autocomplete_view_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 200 ime_inline_autocomplete_view_->SetAutoColorReadabilityEnabled(false); | 200 ime_inline_autocomplete_view_->SetAutoColorReadabilityEnabled(false); |
| 201 ime_inline_autocomplete_view_->set_background( | 201 ime_inline_autocomplete_view_->set_background( |
| 202 views::Background::CreateSolidBackground(GetNativeTheme()->GetSystemColor( | 202 views::Background::CreateThemedSolidBackground( |
| 203 ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused))); | 203 ime_inline_autocomplete_view_, |
| 204 ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused)); |
| 204 ime_inline_autocomplete_view_->SetEnabledColor( | 205 ime_inline_autocomplete_view_->SetEnabledColor( |
| 205 GetNativeTheme()->GetSystemColor( | 206 GetNativeTheme()->GetSystemColor( |
| 206 ui::NativeTheme::kColorId_TextfieldSelectionColor)); | 207 ui::NativeTheme::kColorId_TextfieldSelectionColor)); |
| 207 ime_inline_autocomplete_view_->SetVisible(false); | 208 ime_inline_autocomplete_view_->SetVisible(false); |
| 208 AddChildView(ime_inline_autocomplete_view_); | 209 AddChildView(ime_inline_autocomplete_view_); |
| 209 | 210 |
| 210 selected_keyword_view_ = new SelectedKeywordView(font_list, profile()); | 211 selected_keyword_view_ = new SelectedKeywordView(font_list, profile()); |
| 211 AddChildView(selected_keyword_view_); | 212 AddChildView(selected_keyword_view_); |
| 212 | 213 |
| 213 gfx::FontList bubble_font_list = | 214 gfx::FontList bubble_font_list = |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 // LocationBarView, private TemplateURLServiceObserver implementation: | 1041 // LocationBarView, private TemplateURLServiceObserver implementation: |
| 1041 | 1042 |
| 1042 void LocationBarView::OnTemplateURLServiceChanged() { | 1043 void LocationBarView::OnTemplateURLServiceChanged() { |
| 1043 template_url_service_->RemoveObserver(this); | 1044 template_url_service_->RemoveObserver(this); |
| 1044 template_url_service_ = nullptr; | 1045 template_url_service_ = nullptr; |
| 1045 // If the browser is no longer active, let's not show the info bubble, as this | 1046 // If the browser is no longer active, let's not show the info bubble, as this |
| 1046 // would make the browser the active window again. | 1047 // would make the browser the active window again. |
| 1047 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1048 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
| 1048 ShowFirstRunBubble(); | 1049 ShowFirstRunBubble(); |
| 1049 } | 1050 } |
| OLD | NEW |