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

Unified Diff: ui/native_theme/native_theme_aurawin.cc

Issue 2290743002: Partial revert of https://codereview.chromium.org/1911973002/ (Closed)
Patch Set: mac libtool Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/native_theme/native_theme_aurawin.h ('k') | ui/views/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_aurawin.cc
diff --git a/ui/native_theme/native_theme_aurawin.cc b/ui/native_theme/native_theme_aurawin.cc
deleted file mode 100644
index 03e53c65fdbd5f43530641dd5057df2b28c9ab08..0000000000000000000000000000000000000000
--- a/ui/native_theme/native_theme_aurawin.cc
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/native_theme/native_theme_aurawin.h"
-
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "ui/native_theme/common_theme.h"
-#include "ui/native_theme/native_theme_win.h"
-
-namespace ui {
-
-namespace {
-
-bool IsScrollbarPart(NativeTheme::Part part) {
- switch (part) {
- case NativeTheme::kScrollbarDownArrow:
- case NativeTheme::kScrollbarLeftArrow:
- case NativeTheme::kScrollbarRightArrow:
- case NativeTheme::kScrollbarUpArrow:
- case NativeTheme::kScrollbarHorizontalThumb:
- case NativeTheme::kScrollbarVerticalThumb:
- case NativeTheme::kScrollbarHorizontalTrack:
- case NativeTheme::kScrollbarVerticalTrack:
- case NativeTheme::kScrollbarHorizontalGripper:
- case NativeTheme::kScrollbarVerticalGripper:
- case NativeTheme::kScrollbarCorner:
- return true;
- default:
- return false;
- }
-}
-
-} // namespace
-
-// static
-NativeTheme* NativeTheme::GetInstanceForWeb() {
- return NativeThemeAuraWin::instance();
-}
-
-// static
-NativeThemeAura* NativeThemeAura::instance() {
- return NativeThemeAuraWin::instance();
-}
-
-// static
-NativeThemeAuraWin* NativeThemeAuraWin::instance() {
- CR_DEFINE_STATIC_LOCAL(NativeThemeAuraWin, s_native_theme, ());
- return &s_native_theme;
-}
-
-NativeThemeAuraWin::NativeThemeAuraWin() {
-}
-
-NativeThemeAuraWin::~NativeThemeAuraWin() {
-}
-
-void NativeThemeAuraWin::Paint(SkCanvas* canvas,
- Part part,
- State state,
- const gfx::Rect& rect,
- const ExtraParams& extra) const {
- if (IsScrollbarPart(part) &&
- NativeThemeWin::instance()->IsUsingHighContrastTheme()) {
- NativeThemeWin::instance()->Paint(canvas, part, state, rect, extra);
- return;
- }
-
- NativeThemeAura::Paint(canvas, part, state, rect, extra);
-}
-
-gfx::Size NativeThemeAuraWin::GetPartSize(Part part,
- State state,
- const ExtraParams& extra) const {
- // We want aura on windows to use the same size for scrollbars as we would in
- // the native theme.
- if (IsScrollbarPart(part))
- return NativeThemeWin::instance()->GetPartSize(part, state, extra);
-
- return NativeThemeAura::GetPartSize(part, state, extra);
-}
-
-} // namespace ui
« no previous file with comments | « ui/native_theme/native_theme_aurawin.h ('k') | ui/views/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698