summaryrefslogtreecommitdiffstats
path: root/views/controls/tabbed_pane
diff options
context:
space:
mode:
authorrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-27 20:39:35 +0000
committerrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-27 20:39:35 +0000
commitf9e77d7d6dd6ffe2a686ae98d8bba47abd92ad9a (patch)
treecba32fc4a32415221c1a5ea30944a27cbf075761 /views/controls/tabbed_pane
parent311cb806c0d6eb603d4e29606bf33d83bdea3d22 (diff)
downloadchromium_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 'views/controls/tabbed_pane')
-rw-r--r--views/controls/tabbed_pane/native_tabbed_pane_win.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/views/controls/tabbed_pane/native_tabbed_pane_win.cc b/views/controls/tabbed_pane/native_tabbed_pane_win.cc
index 313716f..0054de0 100644
--- a/views/controls/tabbed_pane/native_tabbed_pane_win.cc
+++ b/views/controls/tabbed_pane/native_tabbed_pane_win.cc
@@ -38,10 +38,11 @@ class TabBackground : public Background {
virtual ~TabBackground() {}
virtual void Paint(gfx::Canvas* canvas, View* view) const {
- HDC dc = canvas->BeginPlatformPaint();
- RECT r = {0, 0, view->width(), view->height()};
- gfx::NativeThemeWin::instance()->PaintTabPanelBackground(dc, &r);
- canvas->EndPlatformPaint();
+ gfx::Rect r(0, 0, view->width(), view->height());
+ gfx::NativeTheme::ExtraParams extra;
+ gfx::NativeTheme::instance()->Paint(
+ canvas->AsCanvasSkia(), gfx::NativeTheme::kTabPanelBackground,
+ gfx::NativeTheme::kNormal, r, extra);
}
private: