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

Side by Side Diff: ui/native_theme/native_theme_android.cc

Issue 2484043003: Revert of Clean up some NativeTheme code. (Closed)
Patch Set: Created 4 years, 1 month 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 "ui/native_theme/native_theme_android.h" 5 #include "ui/native_theme/native_theme_android.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/gfx/geometry/size.h" 8 #include "ui/gfx/geometry/size.h"
9 9
10 namespace ui { 10 namespace ui {
11 11
12 namespace { 12 namespace {
13 // These are the default dimensions of radio buttons and checkboxes on Android. 13 // These are the default dimensions of radio buttons and checkboxes on Android.
14 const int kCheckboxAndRadioWidth = 16; 14 const int kCheckboxAndRadioWidth = 16;
15 const int kCheckboxAndRadioHeight = 16; 15 const int kCheckboxAndRadioHeight = 16;
16 } 16 }
17 17
18 #if !defined(USE_AURA) 18 #if !defined(USE_AURA)
19 // static 19 // static
20 NativeTheme* NativeTheme::GetInstanceForWeb() { 20 NativeTheme* NativeTheme::GetInstanceForWeb() {
21 return NativeThemeAndroid::instance(); 21 return NativeThemeAndroid::instance();
22 } 22 }
23
24 NativeTheme* NativeTheme::GetInstanceForNativeUi() {
25 NOTREACHED();
26 return nullptr;
27 }
28 #endif 23 #endif
29 24
30 // static 25 // static
31 NativeThemeAndroid* NativeThemeAndroid::instance() { 26 NativeThemeAndroid* NativeThemeAndroid::instance() {
32 CR_DEFINE_STATIC_LOCAL(NativeThemeAndroid, s_native_theme, ()); 27 CR_DEFINE_STATIC_LOCAL(NativeThemeAndroid, s_native_theme, ());
33 return &s_native_theme; 28 return &s_native_theme;
34 } 29 }
35 30
36 gfx::Size NativeThemeAndroid::GetPartSize(Part part, 31 gfx::Size NativeThemeAndroid::GetPartSize(Part part,
37 State state, 32 State state,
(...skipping 14 matching lines...) Expand all
52 rect->bottom() - 1); 47 rect->bottom() - 1);
53 } 48 }
54 49
55 NativeThemeAndroid::NativeThemeAndroid() { 50 NativeThemeAndroid::NativeThemeAndroid() {
56 } 51 }
57 52
58 NativeThemeAndroid::~NativeThemeAndroid() { 53 NativeThemeAndroid::~NativeThemeAndroid() {
59 } 54 }
60 55
61 } // namespace ui 56 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698