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

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

Issue 2375543003: Add SetProminent() to MdTextButton to create blue buttons. (Closed)
Patch Set: Fix nits. Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/bubble_icon_view.h" 5 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h"
6 6
7 #include "chrome/browser/command_updater.h" 7 #include "chrome/browser/command_updater.h"
8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
9 #include "ui/accessibility/ax_view_state.h" 9 #include "ui/accessibility/ax_view_state.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void BubbleIconView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 181 void BubbleIconView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
182 views::BubbleDialogDelegateView* bubble = GetBubble(); 182 views::BubbleDialogDelegateView* bubble = GetBubble();
183 if (bubble) 183 if (bubble)
184 bubble->OnAnchorBoundsChanged(); 184 bubble->OnAnchorBoundsChanged();
185 } 185 }
186 186
187 void BubbleIconView::UpdateIcon() { 187 void BubbleIconView::UpdateIcon() {
188 const ui::NativeTheme* theme = GetNativeTheme(); 188 const ui::NativeTheme* theme = GetNativeTheme();
189 SkColor icon_color = 189 SkColor icon_color =
190 active_ 190 active_
191 ? theme->GetSystemColor(ui::NativeTheme::kColorId_CallToActionColor) 191 ? theme->GetSystemColor(
192 ui::NativeTheme::kColorId_ProminentButtonColor)
192 : GetInkDropBaseColor(); 193 : GetInkDropBaseColor();
193 image_->SetImage(gfx::CreateVectorIcon( 194 image_->SetImage(gfx::CreateVectorIcon(
194 GetVectorIcon(), LocationBarView::kLocationBarIconWidth, icon_color)); 195 GetVectorIcon(), LocationBarView::kLocationBarIconWidth, icon_color));
195 } 196 }
196 197
197 void BubbleIconView::SetActiveInternal(bool active) { 198 void BubbleIconView::SetActiveInternal(bool active) {
198 if (active_ == active) 199 if (active_ == active)
199 return; 200 return;
200 active_ = active; 201 active_ = active;
201 UpdateIcon(); 202 UpdateIcon();
202 } 203 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/confirm_infobar.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698