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

Unified Diff: chrome/browser/ui/views/dropdown_bar_view.cc

Issue 10382144: Change SetImage, SetBackground, and SetToggledImage to take in a gfx::ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 7 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/dropdown_bar_view.h ('k') | chrome/browser/ui/views/edit_search_engine_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/dropdown_bar_view.cc
diff --git a/chrome/browser/ui/views/dropdown_bar_view.cc b/chrome/browser/ui/views/dropdown_bar_view.cc
index dd9190816916c573f1d47024493ab90855e406a9..42e1f3bc2f76f01d4a604bbd9d4d2a420f7ad1ad 100644
--- a/chrome/browser/ui/views/dropdown_bar_view.cc
+++ b/chrome/browser/ui/views/dropdown_bar_view.cc
@@ -13,6 +13,7 @@
#include "third_party/skia/include/core/SkRect.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/image/image_skia.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/painter.h"
@@ -29,8 +30,8 @@ const int kAnimatingEdgeHeight = 5;
class DropdownBackground : public views::Background {
public:
explicit DropdownBackground(BrowserView* browser,
- const SkBitmap* left_alpha_mask,
- const SkBitmap* right_alpha_mask);
+ const gfx::ImageSkia* left_alpha_mask,
+ const gfx::ImageSkia* right_alpha_mask);
virtual ~DropdownBackground() {}
// Overridden from views::Background.
@@ -38,15 +39,15 @@ class DropdownBackground : public views::Background {
private:
BrowserView* browser_view_;
- const SkBitmap* left_alpha_mask_;
- const SkBitmap* right_alpha_mask_;
+ const gfx::ImageSkia* left_alpha_mask_;
+ const gfx::ImageSkia* right_alpha_mask_;
DISALLOW_COPY_AND_ASSIGN(DropdownBackground);
};
DropdownBackground::DropdownBackground(BrowserView* browser_view,
- const SkBitmap* left_alpha_mask,
- const SkBitmap* right_alpha_mask)
+ const gfx::ImageSkia* left_alpha_mask,
+ const gfx::ImageSkia* right_alpha_mask)
: browser_view_(browser_view),
left_alpha_mask_(left_alpha_mask),
right_alpha_mask_(right_alpha_mask) {
@@ -122,8 +123,8 @@ void DropdownBarView::OnPaint(gfx::Canvas* canvas) {
////////////////////////////////////////////////////////////////////////////////
// DropDownBarView, protected:
-void DropdownBarView::SetBackground(const SkBitmap* left_alpha_mask,
- const SkBitmap* right_alpha_mask) {
+void DropdownBarView::SetBackground(const gfx::ImageSkia* left_alpha_mask,
+ const gfx::ImageSkia* right_alpha_mask) {
set_background(new DropdownBackground(host()->browser_view(), left_alpha_mask,
right_alpha_mask));
}
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_view.h ('k') | chrome/browser/ui/views/edit_search_engine_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698