diff options
author | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 20:39:35 +0000 |
---|---|---|
committer | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 20:39:35 +0000 |
commit | f9e77d7d6dd6ffe2a686ae98d8bba47abd92ad9a (patch) | |
tree | cba32fc4a32415221c1a5ea30944a27cbf075761 /ui/gfx/native_theme.h | |
parent | 311cb806c0d6eb603d4e29606bf33d83bdea3d22 (diff) | |
download | chromium_src-f9e77d7d6dd6ffe2a686ae98d8bba47abd92ad9a.zip chromium_src-f9e77d7d6dd6ffe2a686ae98d8bba47abd92ad9a.tar.gz chromium_src-f9e77d7d6dd6ffe2a686ae98d8bba47abd92ad9a.tar.bz2 |
Step 5 in native theme refactoring
Moved all calls to new API. Kept PaintTextField() still available from the
old API since there is one user of the method that is not in views::View
specific code, and does not have access to gfx::Canvas and such.
Also moved callers of GetThemePartSize() to the new GetPartSize() API.
BUG=None
TEST=Use the following URL to test all possible controls on web pages:
http://www.corp.google.com/~rogerta/no_crawl/widgets_test.html All controls
should look and before the same with and without my changes. Also, make sure
the chrome UI has not been changed, for example the wrench menu.
Review URL: http://codereview.chromium.org/6880107
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83204 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/native_theme.h')
-rw-r--r-- | ui/gfx/native_theme.h | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/ui/gfx/native_theme.h b/ui/gfx/native_theme.h index d1c6020..0d41767 100644 --- a/ui/gfx/native_theme.h +++ b/ui/gfx/native_theme.h @@ -33,34 +33,40 @@ class NativeTheme { public: // The part to be painted / sized. enum Part { + kCheckbox, + kInnerSpinButton, + kMenuList, + kMenuCheck, + kMenuCheckBackground, + kMenuPopupArrow, + kMenuPopupBackground, + kMenuPopupGutter, + kMenuPopupSeparator, + kMenuItemBackground, + kProgressBar, + kPushButton, + kRadio, + + // The order of the arrow enums is important, do not change without also + // changing the code in platform implementations. kScrollbarDownArrow, kScrollbarLeftArrow, kScrollbarRightArrow, kScrollbarUpArrow, + kScrollbarHorizontalThumb, kScrollbarVerticalThumb, kScrollbarHorizontalTrack, kScrollbarVerticalTrack, kScrollbarHorizontalGripper, kScrollbarVerticalGripper, - kCheckbox, - kRadio, - kPushButton, - kTextField, - kMenuList, - kMenuCheck, - kMenuCheckBackground, - kMenuPopupArrow, - kMenuPopupBackground, - kMenuPopupGutter, - kMenuPopupSeparator, - kMenuItemBackground, kSliderTrack, kSliderThumb, - kInnerSpinButton, - kProgressBar, + kTabPanelBackground, + kTextField, kTrackbarThumb, kTrackbarTrack, + kWindowResizeGripper, kMaxPart, }; @@ -151,6 +157,11 @@ class NativeTheme { bool is_text_area; bool is_listbox; SkColor background_color; + bool is_read_only; + bool is_focused; + bool fill_content_area; + bool draw_edges; + int classic_state; // Used on Windows when uxtheme is not available. }; struct TrackbarExtraParams { @@ -175,7 +186,9 @@ class NativeTheme { }; // Return the size of the part. - virtual Size GetPartSize(Part part) const = 0; + virtual Size GetPartSize(Part part, + State state, + const ExtraParams& extra) const = 0; // Paint the part to the canvas. virtual void Paint(SkCanvas* canvas, |