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

Side by Side Diff: ui/views/controls/menu/menu_item_view_views.cc

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
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/views/controls/menu/menu_item_view.h" 5 #include "ui/views/controls/menu/menu_item_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "third_party/skia/include/effects/SkGradientShader.h" 9 #include "third_party/skia/include/effects/SkGradientShader.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/gfx/canvas_skia.h" 11 #include "ui/gfx/canvas.h"
12 #include "ui/gfx/favicon_size.h" 12 #include "ui/gfx/favicon_size.h"
13 #include "ui/gfx/native_theme.h" 13 #include "ui/gfx/native_theme.h"
14 #include "ui/views/controls/menu/menu_config.h" 14 #include "ui/views/controls/menu/menu_config.h"
15 #include "ui/views/controls/menu/menu_image_util.h" 15 #include "ui/views/controls/menu/menu_image_util.h"
16 #include "ui/views/controls/menu/submenu_view.h" 16 #include "ui/views/controls/menu/submenu_view.h"
17 17
18 namespace views { 18 namespace views {
19 19
20 void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { 20 void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
21 const MenuConfig& config = MenuConfig::instance(); 21 const MenuConfig& config = MenuConfig::instance();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 top_margin + (available_height - 99 top_margin + (available_height -
100 config.arrow_width) / 2, 100 config.arrow_width) / 2,
101 config.arrow_width, height()); 101 config.arrow_width, height());
102 AdjustBoundsForRTLUI(&arrow_bounds); 102 AdjustBoundsForRTLUI(&arrow_bounds);
103 canvas->DrawBitmapInt(*GetSubmenuArrowImage(), 103 canvas->DrawBitmapInt(*GetSubmenuArrowImage(),
104 arrow_bounds.x(), arrow_bounds.y()); 104 arrow_bounds.x(), arrow_bounds.y());
105 } 105 }
106 } 106 }
107 107
108 } // namespace views 108 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698