summaryrefslogtreecommitdiffstats
path: root/ui/aura_shell/launcher/tabbed_launcher_button.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-14 03:44:34 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-14 03:44:34 +0000
commit2fcd9d2dbe87c349113ed6512f701ef101fc295f (patch)
treed6ca089ec5d334020404be435f413dffd6646daa /ui/aura_shell/launcher/tabbed_launcher_button.h
parent9f2d2f4a768ea8edaf7a6ff2efa73214d25f6a61 (diff)
downloadchromium_src-2fcd9d2dbe87c349113ed6512f701ef101fc295f.zip
chromium_src-2fcd9d2dbe87c349113ed6512f701ef101fc295f.tar.gz
chromium_src-2fcd9d2dbe87c349113ed6512f701ef101fc295f.tar.bz2
Shrinks the launcher down to 48 pixels high, changes chromium image
appropriately, and gets browser window entry to match mocks. For aura_shell I'm randomly adding 3 images to test that it works. BUG=97262 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/8274019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura_shell/launcher/tabbed_launcher_button.h')
-rw-r--r--ui/aura_shell/launcher/tabbed_launcher_button.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/ui/aura_shell/launcher/tabbed_launcher_button.h b/ui/aura_shell/launcher/tabbed_launcher_button.h
new file mode 100644
index 0000000..df987f7
--- /dev/null
+++ b/ui/aura_shell/launcher/tabbed_launcher_button.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_AURA_SHELL_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_
+#define UI_AURA_SHELL_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_
+#pragma once
+
+#include "ui/aura_shell/launcher/launcher_types.h"
+#include "views/controls/button/custom_button.h"
+
+namespace aura_shell {
+namespace internal {
+
+// Button used for items on the launcher corresponding to tabbed windows.
+class TabbedLauncherButton : public views::CustomButton {
+ public:
+ explicit TabbedLauncherButton(views::ButtonListener* listener);
+ virtual ~TabbedLauncherButton();
+
+ // 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;
+ virtual void ViewHierarchyChanged(bool is_add,
+ views::View* parent,
+ views::View* child) OVERRIDE;
+
+ private:
+ LauncherTabbedImages images_;
+
+ static SkBitmap* bg_image_;
+
+ DISALLOW_COPY_AND_ASSIGN(TabbedLauncherButton);
+};
+
+} // namespace internal
+} // namespace aura_shell
+
+#endif // UI_AURA_SHELL_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_