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

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

Issue 9703026: Makes the maximize/restore button handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 years, 9 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/launcher.cc ('k') | ash/launcher/launcher_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_LAUNCHER_BUTTON_H_ 5 #ifndef ASH_LAUNCHER_LAUNCHER_BUTTON_H_
6 #define ASH_LAUNCHER_LAUNCHER_BUTTON_H_ 6 #define ASH_LAUNCHER_LAUNCHER_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/views/controls/button/custom_button.h" 9 #include "ui/views/controls/button/custom_button.h"
10 #include "ui/views/controls/image_view.h" 10 #include "ui/views/controls/image_view.h"
(...skipping 21 matching lines...) Expand all
32 LauncherButtonHost* host); 32 LauncherButtonHost* host);
33 33
34 // Sets the image to display for this entry. 34 // Sets the image to display for this entry.
35 void SetImage(const SkBitmap& image); 35 void SetImage(const SkBitmap& image);
36 36
37 // |state| is or'd into the current state. 37 // |state| is or'd into the current state.
38 void AddState(State state); 38 void AddState(State state);
39 void ClearState(State state); 39 void ClearState(State state);
40 int state() const { return state_; } 40 int state() const { return state_; }
41 41
42 // Returns the bounds of the icon.
43 gfx::Rect GetIconBounds() const;
44
42 protected: 45 protected:
43 LauncherButton(views::ButtonListener* listener, LauncherButtonHost* host); 46 LauncherButton(views::ButtonListener* listener, LauncherButtonHost* host);
44 47
45 // Class that draws the icon part of a button, so it can be animated 48 // Class that draws the icon part of a button, so it can be animated
46 // independently of the rest. This can be subclassed to provide a custom 49 // independently of the rest. This can be subclassed to provide a custom
47 // implementation, by overriding CreateIconView(). 50 // implementation, by overriding CreateIconView().
48 class IconView : public views::ImageView { 51 class IconView : public views::ImageView {
49 public: 52 public:
50 IconView(); 53 IconView();
51 virtual ~IconView(); 54 virtual ~IconView();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // together. 96 // together.
94 int state_; 97 int state_;
95 98
96 DISALLOW_COPY_AND_ASSIGN(LauncherButton); 99 DISALLOW_COPY_AND_ASSIGN(LauncherButton);
97 }; 100 };
98 101
99 } // namespace internal 102 } // namespace internal
100 } // namespace ash 103 } // namespace ash
101 104
102 #endif // ASH_LAUNCHER_APP_LAUNCHER_BUTTON_H_ 105 #endif // ASH_LAUNCHER_APP_LAUNCHER_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/launcher/launcher.cc ('k') | ash/launcher/launcher_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698