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

Side by Side Diff: ash/launcher/overflow_button.h

Issue 22527003: ash:Shelf Overflow Button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/launcher/overflow_bubble.cc ('k') | ash/launcher/overflow_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_LAUNCHER_OVERFLOW_BUTTON_H_ 5 #ifndef ASH_LAUNCHER_OVERFLOW_BUTTON_H_
6 #define ASH_LAUNCHER_OVERFLOW_BUTTON_H_ 6 #define ASH_LAUNCHER_OVERFLOW_BUTTON_H_
7 7
8 #include "ash/shelf/shelf_types.h" 8 #include "ash/shelf/shelf_types.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ui/gfx/image/image_skia.h"
11 #include "ui/views/controls/button/custom_button.h" 12 #include "ui/views/controls/button/custom_button.h"
12 13
13 namespace gfx {
14 class ImageSkia;
15 }
16
17 namespace ash { 14 namespace ash {
18 namespace internal { 15 namespace internal {
19 16
20 // Launcher overflow chevron button. 17 // Launcher overflow chevron button.
21 class OverflowButton : public views::CustomButton { 18 class OverflowButton : public views::CustomButton {
22 public: 19 public:
23 explicit OverflowButton(views::ButtonListener* listener); 20 explicit OverflowButton(views::ButtonListener* listener);
24 virtual ~OverflowButton(); 21 virtual ~OverflowButton();
25 22
26 void OnShelfAlignmentChanged(); 23 void OnShelfAlignmentChanged();
27 24
28 private: 25 private:
29 void PaintBackground(gfx::Canvas* canvas, int alpha); 26 void PaintBackground(gfx::Canvas* canvas, int alpha);
30 27
31 // views::View overrides: 28 // views::View overrides:
32 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 29 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
33 30
34 const gfx::ImageSkia* image_; 31 // Left and right images are rotations of bottom_image and are
32 // owned by the overflow button.
33 gfx::ImageSkia left_image_;
34 gfx::ImageSkia right_image_;
35 // Bottom image is owned by the resource bundle.
36 const gfx::ImageSkia* bottom_image_;
35 37
36 DISALLOW_COPY_AND_ASSIGN(OverflowButton); 38 DISALLOW_COPY_AND_ASSIGN(OverflowButton);
37 }; 39 };
38 40
39 } // namespace internal 41 } // namespace internal
40 } // namespace ash 42 } // namespace ash
41 43
42 #endif // ASH_LAUNCHER_OVERFLOW_BUTTON_H_ 44 #endif // ASH_LAUNCHER_OVERFLOW_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/launcher/overflow_bubble.cc ('k') | ash/launcher/overflow_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698