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

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 2382443007: Clean up NativeTheme (particularly CommonTheme). (Closed)
Patch Set: tdandersonreview 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 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
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));
sky 2016/10/03 16:12:05 Why is a hard coded color good here?
Evan Stade 2016/10/03 19:46:44 a) we don't need it to vary depending on the nativ
224 ui::NativeTheme::kColorId_ButtonHoverBackgroundColor));
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698