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

Unified Diff: ui/aura_shell/launcher/tabbed_launcher_button.h

Issue 8916010: Reverting issues 8873036 and issues 8933010 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « ui/aura_shell/launcher/launcher_view.cc ('k') | ui/aura_shell/launcher/tabbed_launcher_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/launcher/tabbed_launcher_button.h
diff --git a/ui/aura_shell/launcher/tabbed_launcher_button.h b/ui/aura_shell/launcher/tabbed_launcher_button.h
index a945074b61fb701339bb12e7c6cb18300a2e4d82..5534e1fdb3a9407694510fb82e888a643a337824 100644
--- a/ui/aura_shell/launcher/tabbed_launcher_button.h
+++ b/ui/aura_shell/launcher/tabbed_launcher_button.h
@@ -7,7 +7,7 @@
#pragma once
#include "ui/aura_shell/launcher/launcher_types.h"
-#include "ui/views/controls/button/image_button.h"
+#include "ui/views/controls/button/custom_button.h"
namespace aura_shell {
namespace internal {
@@ -15,7 +15,7 @@ namespace internal {
class LauncherButtonHost;
// Button used for items on the launcher corresponding to tabbed windows.
-class TabbedLauncherButton : public views::ImageButton {
+class TabbedLauncherButton : public views::CustomButton {
public:
TabbedLauncherButton(views::ButtonListener* listener,
LauncherButtonHost* host);
@@ -24,6 +24,9 @@ class TabbedLauncherButton : public views::ImageButton {
// Sets the images to display for this entry.
void SetImages(const LauncherTabbedImages& images);
+ // View overrides:
+ virtual gfx::Size GetPreferredSize() OVERRIDE;
+
protected:
// View overrides:
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
@@ -33,25 +36,15 @@ class TabbedLauncherButton : public views::ImageButton {
virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
private:
- struct ImageSet {
- SkBitmap* normal_image;
- SkBitmap* pushed_image;
- SkBitmap* hot_image;
- };
-
- // Creates an ImageSet using the specified image ids. Caller owns the returned
- // value.
- static ImageSet* CreateImageSet(int normal_id, int pushed_id, int hot_id);
-
LauncherTabbedImages images_;
LauncherButtonHost* host_;
// Background images. Which one is chosen depends upon how many images are
// provided.
- static ImageSet* bg_image_1_;
- static ImageSet* bg_image_2_;
- static ImageSet* bg_image_3_;
+ static SkBitmap* bg_image_1_;
+ static SkBitmap* bg_image_2_;
+ static SkBitmap* bg_image_3_;
DISALLOW_COPY_AND_ASSIGN(TabbedLauncherButton);
};
« no previous file with comments | « ui/aura_shell/launcher/launcher_view.cc ('k') | ui/aura_shell/launcher/tabbed_launcher_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698