| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 ui::NativeTheme::kColorId_TextfieldSelectionColor)); | 206 ui::NativeTheme::kColorId_TextfieldSelectionColor)); |
| 207 ime_inline_autocomplete_view_->SetVisible(false); | 207 ime_inline_autocomplete_view_->SetVisible(false); |
| 208 AddChildView(ime_inline_autocomplete_view_); | 208 AddChildView(ime_inline_autocomplete_view_); |
| 209 | 209 |
| 210 selected_keyword_view_ = new SelectedKeywordView(font_list, profile()); | 210 selected_keyword_view_ = new SelectedKeywordView(font_list, profile()); |
| 211 AddChildView(selected_keyword_view_); | 211 AddChildView(selected_keyword_view_); |
| 212 | 212 |
| 213 gfx::FontList bubble_font_list = | 213 gfx::FontList bubble_font_list = |
| 214 font_list.DeriveWithHeightUpperBound(bubble_height); | 214 font_list.DeriveWithHeightUpperBound(bubble_height); |
| 215 keyword_hint_view_ = new KeywordHintView( | 215 keyword_hint_view_ = new KeywordHintView( |
| 216 this, profile(), font_list, bubble_font_list, location_height, | 216 this, profile(), font_list, bubble_font_list, |
| 217 GetColor(LocationBarView::DEEMPHASIZED_TEXT), background_color); | 217 GetColor(LocationBarView::DEEMPHASIZED_TEXT), background_color); |
| 218 AddChildView(keyword_hint_view_); | 218 AddChildView(keyword_hint_view_); |
| 219 | 219 |
| 220 std::vector<std::unique_ptr<ContentSettingImageModel>> models = | 220 std::vector<std::unique_ptr<ContentSettingImageModel>> models = |
| 221 ContentSettingImageModel::GenerateContentSettingImageModels(); | 221 ContentSettingImageModel::GenerateContentSettingImageModels(); |
| 222 for (auto& model : models) { | 222 for (auto& model : models) { |
| 223 ContentSettingImageView* image_view = | 223 ContentSettingImageView* image_view = |
| 224 new ContentSettingImageView(std::move(model), this, font_list); | 224 new ContentSettingImageView(std::move(model), this, font_list); |
| 225 content_setting_views_.push_back(image_view); | 225 content_setting_views_.push_back(image_view); |
| 226 image_view->SetVisible(false); | 226 image_view->SetVisible(false); |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 // LocationBarView, private TemplateURLServiceObserver implementation: | 1041 // LocationBarView, private TemplateURLServiceObserver implementation: |
| 1042 | 1042 |
| 1043 void LocationBarView::OnTemplateURLServiceChanged() { | 1043 void LocationBarView::OnTemplateURLServiceChanged() { |
| 1044 template_url_service_->RemoveObserver(this); | 1044 template_url_service_->RemoveObserver(this); |
| 1045 template_url_service_ = nullptr; | 1045 template_url_service_ = nullptr; |
| 1046 // 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 |
| 1047 // would make the browser the active window again. | 1047 // would make the browser the active window again. |
| 1048 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1048 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
| 1049 ShowFirstRunBubble(); | 1049 ShowFirstRunBubble(); |
| 1050 } | 1050 } |
| OLD | NEW |