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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 2734113006: "Bootstrap" a toolkit-views Typography spec. (Closed)
Patch Set: fix windows Created 3 years, 9 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
OLDNEW
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 // Initialize the Omnibox view. 192 // Initialize the Omnibox view.
193 omnibox_view_ = new OmniboxViewViews( 193 omnibox_view_ = new OmniboxViewViews(
194 this, base::MakeUnique<ChromeOmniboxClient>(this, profile()), 194 this, base::MakeUnique<ChromeOmniboxClient>(this, profile()),
195 command_updater(), is_popup_mode_, this, font_list); 195 command_updater(), is_popup_mode_, this, font_list);
196 omnibox_view_->Init(); 196 omnibox_view_->Init();
197 AddChildView(omnibox_view_); 197 AddChildView(omnibox_view_);
198 198
199 // Initialize the inline autocomplete view which is visible only when IME is 199 // Initialize the inline autocomplete view which is visible only when IME is
200 // turned on. Use the same font with the omnibox and highlighted background. 200 // turned on. Use the same font with the omnibox and highlighted background.
201 ime_inline_autocomplete_view_ = new views::Label(base::string16(), font_list); 201 ime_inline_autocomplete_view_ =
202 new views::Label(base::string16(), views::Label::CustomFont{font_list});
202 ime_inline_autocomplete_view_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 203 ime_inline_autocomplete_view_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
203 ime_inline_autocomplete_view_->SetAutoColorReadabilityEnabled(false); 204 ime_inline_autocomplete_view_->SetAutoColorReadabilityEnabled(false);
204 ime_inline_autocomplete_view_->set_background( 205 ime_inline_autocomplete_view_->set_background(
205 views::Background::CreateSolidBackground(GetNativeTheme()->GetSystemColor( 206 views::Background::CreateSolidBackground(GetNativeTheme()->GetSystemColor(
206 ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused))); 207 ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused)));
207 ime_inline_autocomplete_view_->SetEnabledColor( 208 ime_inline_autocomplete_view_->SetEnabledColor(
208 GetNativeTheme()->GetSystemColor( 209 GetNativeTheme()->GetSystemColor(
209 ui::NativeTheme::kColorId_TextfieldSelectionColor)); 210 ui::NativeTheme::kColorId_TextfieldSelectionColor));
210 ime_inline_autocomplete_view_->SetVisible(false); 211 ime_inline_autocomplete_view_->SetVisible(false);
211 AddChildView(ime_inline_autocomplete_view_); 212 AddChildView(ime_inline_autocomplete_view_);
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 // LocationBarView, private TemplateURLServiceObserver implementation: 1067 // LocationBarView, private TemplateURLServiceObserver implementation:
1067 1068
1068 void LocationBarView::OnTemplateURLServiceChanged() { 1069 void LocationBarView::OnTemplateURLServiceChanged() {
1069 template_url_service_->RemoveObserver(this); 1070 template_url_service_->RemoveObserver(this);
1070 template_url_service_ = nullptr; 1071 template_url_service_ = nullptr;
1071 // If the browser is no longer active, let's not show the info bubble, as this 1072 // If the browser is no longer active, let's not show the info bubble, as this
1072 // would make the browser the active window again. 1073 // would make the browser the active window again.
1073 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1074 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1074 ShowFirstRunBubble(); 1075 ShowFirstRunBubble();
1075 } 1076 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698