summaryrefslogtreecommitdiffstats
path: root/views/controls/menu
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/menu')
-rw-r--r--views/controls/menu/chrome_menu.cc26
-rw-r--r--views/controls/menu/chrome_menu.h10
-rw-r--r--views/controls/menu/menu_win.cc6
3 files changed, 21 insertions, 21 deletions
diff --git a/views/controls/menu/chrome_menu.cc b/views/controls/menu/chrome_menu.cc
index f0cf28b..264c8b7 100644
--- a/views/controls/menu/chrome_menu.cc
+++ b/views/controls/menu/chrome_menu.cc
@@ -8,7 +8,7 @@
#include <uxtheme.h>
#include <Vssym32.h>
-#include "app/gfx/chrome_canvas.h"
+#include "app/gfx/canvas.h"
#include "app/gfx/color_utils.h"
#include "app/l10n_util.h"
#include "app/l10n_util_win.h"
@@ -335,7 +335,7 @@ class MenuScrollButton : public View {
return DragDropTypes::DRAG_NONE;
}
- virtual void Paint(ChromeCanvas* canvas) {
+ virtual void Paint(gfx::Canvas* canvas) {
HDC dc = canvas->beginPlatformPaint();
// The background.
@@ -430,7 +430,7 @@ class MenuScrollViewContainer : public View {
kSubmenuBorderSize, kSubmenuBorderSize));
}
- virtual void Paint(ChromeCanvas* canvas) {
+ virtual void Paint(gfx::Canvas* canvas) {
HDC dc = canvas->beginPlatformPaint();
CRect bounds(0, 0, width(), height());
NativeTheme::instance()->PaintMenuBackground(
@@ -503,7 +503,7 @@ class MenuSeparator : public View {
MenuSeparator() {
}
- void Paint(ChromeCanvas* canvas) {
+ void Paint(gfx::Canvas* canvas) {
// The gutter is rendered before the background.
int start_x = 0;
int start_y = height() / 3;
@@ -873,7 +873,7 @@ void SubmenuView::DidChangeBounds(const gfx::Rect& previous,
SchedulePaint();
}
-void SubmenuView::PaintChildren(ChromeCanvas* canvas) {
+void SubmenuView::PaintChildren(gfx::Canvas* canvas) {
View::PaintChildren(canvas);
if (drop_item_ && drop_position_ != MenuDelegate::DROP_ON)
@@ -1031,7 +1031,7 @@ MenuScrollViewContainer* SubmenuView::GetScrollViewContainer() {
return scroll_view_container_;
}
-void SubmenuView::PaintDropIndicator(ChromeCanvas* canvas,
+void SubmenuView::PaintDropIndicator(gfx::Canvas* canvas,
MenuItemView* item,
MenuDelegate::DropPosition position) {
if (position == MenuDelegate::DROP_NONE)
@@ -1210,7 +1210,7 @@ void MenuItemView::SetIcon(const SkBitmap& icon) {
SchedulePaint();
}
-void MenuItemView::Paint(ChromeCanvas* canvas) {
+void MenuItemView::Paint(gfx::Canvas* canvas) {
Paint(canvas, false);
}
@@ -1374,15 +1374,15 @@ void MenuItemView::PrepareForRun(bool has_mnemonics) {
int MenuItemView::GetDrawStringFlags() {
int flags = 0;
if (UILayoutIsRightToLeft())
- flags |= ChromeCanvas::TEXT_ALIGN_RIGHT;
+ flags |= gfx::Canvas::TEXT_ALIGN_RIGHT;
else
- flags |= ChromeCanvas::TEXT_ALIGN_LEFT;
+ flags |= gfx::Canvas::TEXT_ALIGN_LEFT;
if (has_mnemonics_) {
if (show_mnemonics)
- flags |= ChromeCanvas::SHOW_PREFIX;
+ flags |= gfx::Canvas::SHOW_PREFIX;
else
- flags |= ChromeCanvas::HIDE_PREFIX;
+ flags |= gfx::Canvas::HIDE_PREFIX;
}
return flags;
}
@@ -1423,7 +1423,7 @@ void MenuItemView::AdjustBoundsForRTLUI(RECT* rect) const {
*rect = mirrored_rect.ToRECT();
}
-void MenuItemView::Paint(ChromeCanvas* canvas, bool for_drag) {
+void MenuItemView::Paint(gfx::Canvas* canvas, bool for_drag) {
bool render_selection =
(!for_drag && IsSelected() &&
parent_menu_item_->GetSubmenu()->GetShowSelection(this));
@@ -1824,7 +1824,7 @@ void MenuController::OnMouseDragged(SubmenuView* source,
gfx::Point drag_loc(event.location());
View::ConvertPointToScreen(source->GetScrollViewContainer(), &drag_loc);
View::ConvertPointToView(NULL, item, &drag_loc);
- ChromeCanvas canvas(item->width(), item->height(), false);
+ gfx::Canvas canvas(item->width(), item->height(), false);
item->Paint(&canvas, true);
scoped_refptr<OSExchangeData> data(new OSExchangeData);
diff --git a/views/controls/menu/chrome_menu.h b/views/controls/menu/chrome_menu.h
index 6622cbd..8ff9ec0 100644
--- a/views/controls/menu/chrome_menu.h
+++ b/views/controls/menu/chrome_menu.h
@@ -9,7 +9,7 @@
#include <vector>
#include "app/drag_drop_types.h"
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/font.h"
#include "base/gfx/point.h"
#include "base/gfx/rect.h"
#include "base/message_loop.h"
@@ -352,7 +352,7 @@ class MenuItemView : public View {
int GetCommand() const { return command_; }
// Paints the menu item.
- virtual void Paint(ChromeCanvas* canvas);
+ virtual void Paint(gfx::Canvas* canvas);
// Returns the preferred size of this item.
virtual gfx::Size GetPreferredSize();
@@ -421,7 +421,7 @@ class MenuItemView : public View {
// Actual paint implementation. If for_drag is true, portions of the menu
// are not rendered.
- void Paint(ChromeCanvas* canvas, bool for_drag);
+ void Paint(gfx::Canvas* canvas, bool for_drag);
// Destroys the window used to display this menu and recursively destroys
// the windows used to display all descendants.
@@ -517,7 +517,7 @@ class SubmenuView : public View {
const gfx::Rect& current);
// Painting.
- void PaintChildren(ChromeCanvas* canvas);
+ void PaintChildren(gfx::Canvas* canvas);
// Drag and drop methods. These are forwarded to the MenuController.
virtual bool CanDrop(const OSExchangeData& data);
@@ -578,7 +578,7 @@ class SubmenuView : public View {
private:
// Paints the drop indicator. This is only invoked if item is non-NULL and
// position is not DROP_NONE.
- void PaintDropIndicator(ChromeCanvas* canvas,
+ void PaintDropIndicator(gfx::Canvas* canvas,
MenuItemView* item,
MenuDelegate::DropPosition position);
diff --git a/views/controls/menu/menu_win.cc b/views/controls/menu/menu_win.cc
index b10d8dc..eab1816 100644
--- a/views/controls/menu/menu_win.cc
+++ b/views/controls/menu/menu_win.cc
@@ -12,8 +12,8 @@
#include <atlmisc.h>
#include <string>
-#include "app/gfx/chrome_canvas.h"
-#include "app/gfx/chrome_font.h"
+#include "app/gfx/canvas.h"
+#include "app/gfx/font.h"
#include "app/l10n_util.h"
#include "app/l10n_util_win.h"
#include "base/gfx/rect.h"
@@ -188,7 +188,7 @@ class MenuHostWindow : public CWindowImpl<MenuHostWindow, CWindow,
// Draw the icon after the label, otherwise it would be covered
// by the label.
if (data->icon.width() != 0 && data->icon.height() != 0) {
- ChromeCanvas canvas(data->icon.width(), data->icon.height(), false);
+ gfx::Canvas canvas(data->icon.width(), data->icon.height(), false);
canvas.drawColor(SK_ColorBLACK, SkPorterDuff::kClear_Mode);
canvas.DrawBitmapInt(data->icon, 0, 0);
canvas.getTopPlatformDevice().drawToHDC(hDC, lpdis->rcItem.left +