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

Unified Diff: views/controls/menu/menu_scroll_view_container.cc

Issue 2811032: Revert 50784 - Canvas refactoring part 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 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 | « views/controls/menu/menu_item_view_win.cc ('k') | views/controls/menu/menu_separator_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_scroll_view_container.cc
===================================================================
--- views/controls/menu/menu_scroll_view_container.cc (revision 50789)
+++ views/controls/menu/menu_scroll_view_container.cc (working copy)
@@ -10,7 +10,7 @@
#include <Vssym32.h>
#endif
-#include "gfx/canvas_skia.h"
+#include "gfx/canvas.h"
#include "gfx/color_utils.h"
#include "views/border.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
@@ -83,14 +83,14 @@
const MenuConfig& config = MenuConfig::instance();
#if defined(OS_WIN)
- HDC dc = canvas->AsCanvasSkia()->beginPlatformPaint();
+ HDC dc = canvas->beginPlatformPaint();
// The background.
RECT item_bounds = { 0, 0, width(), height() };
NativeTheme::instance()->PaintMenuItemBackground(
NativeTheme::MENU, dc, MENU_POPUPITEM, MPI_NORMAL, false,
&item_bounds);
- canvas->AsCanvasSkia()->endPlatformPaint();
+ canvas->endPlatformPaint();
SkColor arrow_color = color_utils::GetSysSkColor(COLOR_MENUTEXT);
#else
@@ -185,11 +185,11 @@
}
#if defined(OS_WIN)
- HDC dc = canvas->AsCanvasSkia()->beginPlatformPaint();
+ HDC dc = canvas->beginPlatformPaint();
RECT bounds = {0, 0, width(), height()};
NativeTheme::instance()->PaintMenuBackground(
NativeTheme::MENU, dc, MENU_POPUPBACKGROUND, 0, &bounds);
- canvas->AsCanvasSkia()->endPlatformPaint();
+ canvas->endPlatformPaint();
#elif defined(OS_CHROMEOS)
static const SkColor kGradientColors[2] = {
SK_ColorWHITE,
@@ -220,8 +220,7 @@
canvas->FillRectInt(0, 0, width(), height(), paint);
#else
// This is the same as COLOR_TOOLBAR.
- canvas->AsCanvasSkia()->drawColor(SkColorSetRGB(210, 225, 246),
- SkXfermode::kSrc_Mode);
+ canvas->drawColor(SkColorSetRGB(210, 225, 246), SkXfermode::kSrc_Mode);
#endif
}
« no previous file with comments | « views/controls/menu/menu_item_view_win.cc ('k') | views/controls/menu/menu_separator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698