OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/profiles/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/metrics/user_metrics.h" | 8 #include "base/metrics/user_metrics.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 SetImage(STATE_NORMAL, icon); | 213 SetImage(STATE_NORMAL, icon); |
214 } | 214 } |
215 | 215 |
216 ~BackgroundColorHoverButton() override {} | 216 ~BackgroundColorHoverButton() override {} |
217 | 217 |
218 private: | 218 private: |
219 // views::LabelButton: | 219 // views::LabelButton: |
220 void OnPaint(gfx::Canvas* canvas) override { | 220 void OnPaint(gfx::Canvas* canvas) override { |
221 if ((state() == STATE_PRESSED) || | 221 if ((state() == STATE_PRESSED) || |
222 (state() == STATE_HOVERED)) { | 222 (state() == STATE_HOVERED)) { |
223 canvas->DrawColor(GetNativeTheme()->GetSystemColor( | 223 canvas->DrawColor(SkColorSetRGB(0xEA, 0xEA, 0xEA)); |
224 ui::NativeTheme::kColorId_ButtonHoverBackgroundColor)); | |
Evan Stade
2016/09/30 18:02:36
one reason this was confusing is because it's not
tdanderson
2016/09/30 21:00:56
Acknowledged. So should a TODO be then to replace
Evan Stade
2016/09/30 22:18:59
I did put a TODO in the cocoa version of this code
| |
225 } | 224 } |
226 LabelButton::OnPaint(canvas); | 225 LabelButton::OnPaint(canvas); |
227 } | 226 } |
228 | 227 |
229 DISALLOW_COPY_AND_ASSIGN(BackgroundColorHoverButton); | 228 DISALLOW_COPY_AND_ASSIGN(BackgroundColorHoverButton); |
230 }; | 229 }; |
231 | 230 |
232 // SizedContainer ------------------------------------------------- | 231 // SizedContainer ------------------------------------------------- |
233 | 232 |
234 // A simple container view that takes an explicit preferred size. | 233 // A simple container view that takes an explicit preferred size. |
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2305 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2304 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
2306 IncognitoModePrefs::DISABLED; | 2305 IncognitoModePrefs::DISABLED; |
2307 return incognito_available && !browser_->profile()->IsGuestSession(); | 2306 return incognito_available && !browser_->profile()->IsGuestSession(); |
2308 } | 2307 } |
2309 | 2308 |
2310 void ProfileChooserView::PostActionPerformed( | 2309 void ProfileChooserView::PostActionPerformed( |
2311 ProfileMetrics::ProfileDesktopMenu action_performed) { | 2310 ProfileMetrics::ProfileDesktopMenu action_performed) { |
2312 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 2311 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); |
2313 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 2312 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; |
2314 } | 2313 } |
OLD | NEW |