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

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_drag_controller.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index c3e7ea9558ced84a46cb1bfb028402d202e0e9ff..dce441c7f7a1f015b8b622722da0aa2ec3ff8dc1 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -31,13 +31,13 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "grit/theme_resources.h"
-#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/animation/animation.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/events.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/screen.h"
#include "ui/views/events/event.h"
#include "ui/views/widget/root_view.h"
@@ -106,8 +106,8 @@ class DockView : public views::View {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- SkBitmap* high_icon = rb.GetBitmapNamed(IDR_DOCK_HIGH);
- SkBitmap* wide_icon = rb.GetBitmapNamed(IDR_DOCK_WIDE);
+ gfx::ImageSkia* high_icon = rb.GetImageSkiaNamed(IDR_DOCK_HIGH);
+ gfx::ImageSkia* wide_icon = rb.GetImageSkiaNamed(IDR_DOCK_WIDE);
canvas->Save();
bool rtl_ui = base::i18n::IsRTL();
@@ -126,8 +126,8 @@ class DockView : public views::View {
canvas->DrawBitmapInt(*high_icon, x_of_active_tab,
(height() - high_icon->height()) / 2);
if (type_ == DockInfo::LEFT_OF_WINDOW) {
- DrawBitmapWithAlpha(canvas, *high_icon, x_of_inactive_tab,
- (height() - high_icon->height()) / 2);
+ DrawImageWithAlpha(canvas, *high_icon, x_of_inactive_tab,
+ (height() - high_icon->height()) / 2);
}
break;
@@ -139,8 +139,8 @@ class DockView : public views::View {
canvas->DrawBitmapInt(*high_icon, x_of_active_tab,
(height() - high_icon->height()) / 2);
if (type_ == DockInfo::RIGHT_OF_WINDOW) {
- DrawBitmapWithAlpha(canvas, *high_icon, x_of_inactive_tab,
- (height() - high_icon->height()) / 2);
+ DrawImageWithAlpha(canvas, *high_icon, x_of_inactive_tab,
+ (height() - high_icon->height()) / 2);
}
break;
@@ -150,7 +150,7 @@ class DockView : public views::View {
break;
case DockInfo::MAXIMIZE: {
- SkBitmap* max_icon = rb.GetBitmapNamed(IDR_DOCK_MAX);
+ gfx::ImageSkia* max_icon = rb.GetImageSkiaNamed(IDR_DOCK_MAX);
canvas->DrawBitmapInt(*max_icon, (width() - max_icon->width()) / 2,
(height() - max_icon->height()) / 2);
break;
@@ -161,7 +161,7 @@ class DockView : public views::View {
canvas->DrawBitmapInt(*wide_icon, (width() - wide_icon->width()) / 2,
height() / 2 + kTabSpacing / 2);
if (type_ == DockInfo::BOTTOM_OF_WINDOW) {
- DrawBitmapWithAlpha(canvas, *wide_icon,
+ DrawImageWithAlpha(canvas, *wide_icon,
(width() - wide_icon->width()) / 2,
height() / 2 - kTabSpacing / 2 - wide_icon->height());
}
@@ -175,8 +175,8 @@ class DockView : public views::View {
}
private:
- void DrawBitmapWithAlpha(gfx::Canvas* canvas, const SkBitmap& image,
- int x, int y) {
+ void DrawImageWithAlpha(gfx::Canvas* canvas, const gfx::ImageSkia& image,
+ int x, int y) {
SkPaint paint;
paint.setAlpha(128);
canvas->DrawBitmapInt(image, x, y, paint);
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698