| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 ContentSettingImageModel::GenerateContentSettingImageModels(); | 241 ContentSettingImageModel::GenerateContentSettingImageModels(); |
| 242 for (auto& model : models) { | 242 for (auto& model : models) { |
| 243 ContentSettingImageView* image_view = | 243 ContentSettingImageView* image_view = |
| 244 new ContentSettingImageView(std::move(model), this, font_list); | 244 new ContentSettingImageView(std::move(model), this, font_list); |
| 245 content_setting_views_.push_back(image_view); | 245 content_setting_views_.push_back(image_view); |
| 246 image_view->SetVisible(false); | 246 image_view->SetVisible(false); |
| 247 AddChildView(image_view); | 247 AddChildView(image_view); |
| 248 } | 248 } |
| 249 | 249 |
| 250 zoom_view_ = new ZoomView(delegate_); | 250 zoom_view_ = new ZoomView(delegate_); |
| 251 zoom_view_->Init(); |
| 251 AddChildView(zoom_view_); | 252 AddChildView(zoom_view_); |
| 252 | 253 |
| 253 open_pdf_in_reader_view_ = new OpenPDFInReaderView(); | 254 open_pdf_in_reader_view_ = new OpenPDFInReaderView(); |
| 254 AddChildView(open_pdf_in_reader_view_); | 255 AddChildView(open_pdf_in_reader_view_); |
| 255 | 256 |
| 256 manage_passwords_icon_view_ = new ManagePasswordsIconViews(command_updater()); | 257 manage_passwords_icon_view_ = new ManagePasswordsIconViews(command_updater()); |
| 258 manage_passwords_icon_view_->Init(); |
| 257 AddChildView(manage_passwords_icon_view_); | 259 AddChildView(manage_passwords_icon_view_); |
| 258 | 260 |
| 259 save_credit_card_icon_view_ = | 261 save_credit_card_icon_view_ = |
| 260 new autofill::SaveCardIconView(command_updater(), browser_); | 262 new autofill::SaveCardIconView(command_updater(), browser_); |
| 263 save_credit_card_icon_view_->Init(); |
| 261 save_credit_card_icon_view_->SetVisible(false); | 264 save_credit_card_icon_view_->SetVisible(false); |
| 262 AddChildView(save_credit_card_icon_view_); | 265 AddChildView(save_credit_card_icon_view_); |
| 263 | 266 |
| 264 translate_icon_view_ = new TranslateIconView(command_updater()); | 267 translate_icon_view_ = new TranslateIconView(command_updater()); |
| 268 translate_icon_view_->Init(); |
| 265 translate_icon_view_->SetVisible(false); | 269 translate_icon_view_->SetVisible(false); |
| 266 AddChildView(translate_icon_view_); | 270 AddChildView(translate_icon_view_); |
| 267 | 271 |
| 268 star_view_ = new StarView(command_updater(), browser_); | 272 star_view_ = new StarView(command_updater(), browser_); |
| 273 star_view_->Init(); |
| 269 star_view_->SetVisible(false); | 274 star_view_->SetVisible(false); |
| 270 AddChildView(star_view_); | 275 AddChildView(star_view_); |
| 271 | 276 |
| 272 // Initialize the location entry. We do this to avoid a black flash which is | 277 // Initialize the location entry. We do this to avoid a black flash which is |
| 273 // visible when the location entry has just been initialized. | 278 // visible when the location entry has just been initialized. |
| 274 Update(nullptr); | 279 Update(nullptr); |
| 275 | 280 |
| 276 size_animation_.Reset(1); | 281 size_animation_.Reset(1); |
| 277 } | 282 } |
| 278 | 283 |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 // LocationBarView, private TemplateURLServiceObserver implementation: | 1236 // LocationBarView, private TemplateURLServiceObserver implementation: |
| 1232 | 1237 |
| 1233 void LocationBarView::OnTemplateURLServiceChanged() { | 1238 void LocationBarView::OnTemplateURLServiceChanged() { |
| 1234 template_url_service_->RemoveObserver(this); | 1239 template_url_service_->RemoveObserver(this); |
| 1235 template_url_service_ = nullptr; | 1240 template_url_service_ = nullptr; |
| 1236 // If the browser is no longer active, let's not show the info bubble, as this | 1241 // If the browser is no longer active, let's not show the info bubble, as this |
| 1237 // would make the browser the active window again. | 1242 // would make the browser the active window again. |
| 1238 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1243 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
| 1239 ShowFirstRunBubble(); | 1244 ShowFirstRunBubble(); |
| 1240 } | 1245 } |
| OLD | NEW |