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

Side by Side Diff: ash/shelf/shelf_button.h

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « ash/shelf/shelf_bezel_event_filter.cc ('k') | ash/shelf/shelf_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SHELF_SHELF_BUTTON_H_ 5 #ifndef ASH_SHELF_SHELF_BUTTON_H_
6 #define ASH_SHELF_SHELF_BUTTON_H_ 6 #define ASH_SHELF_SHELF_BUTTON_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/gfx/shadow_value.h" 10 #include "ui/gfx/shadow_value.h"
11 #include "ui/views/controls/button/custom_button.h" 11 #include "ui/views/controls/button/custom_button.h"
12 #include "ui/views/controls/image_view.h" 12 #include "ui/views/controls/image_view.h"
13 13
14 namespace ash { 14 namespace ash {
15 class InkDropButtonListener; 15 class InkDropButtonListener;
16 class ShelfView; 16 class ShelfView;
17 17
18 // Button used for items on the launcher, except for the AppList. 18 // Button used for items on the launcher, except for the AppList.
19 class ASH_EXPORT ShelfButton : public views::CustomButton { 19 class ASH_EXPORT ShelfButton : public views::CustomButton {
20 public: 20 public:
21 static const char kViewClassName[]; 21 static const char kViewClassName[];
22 22
23 // Used to indicate the current state of the button. 23 // Used to indicate the current state of the button.
24 enum State { 24 enum State {
25 // Nothing special. Usually represents an app shortcut item with no running 25 // Nothing special. Usually represents an app shortcut item with no running
26 // instance. 26 // instance.
27 STATE_NORMAL = 0, 27 STATE_NORMAL = 0,
28 // Button has mouse hovering on it. 28 // Button has mouse hovering on it.
29 STATE_HOVERED = 1 << 0, 29 STATE_HOVERED = 1 << 0,
30 // Underlying ShelfItem has a running instance. 30 // Underlying ShelfItem has a running instance.
31 STATE_RUNNING = 1 << 1, 31 STATE_RUNNING = 1 << 1,
32 // Underlying ShelfItem is active (i.e. has focus). 32 // Underlying ShelfItem is active (i.e. has focus).
33 STATE_ACTIVE = 1 << 2, 33 STATE_ACTIVE = 1 << 2,
34 // Underlying ShelfItem needs user's attention. 34 // Underlying ShelfItem needs user's attention.
35 STATE_ATTENTION = 1 << 3, 35 STATE_ATTENTION = 1 << 3,
36 STATE_FOCUSED = 1 << 4, 36 STATE_FOCUSED = 1 << 4,
37 // Hide the status (temporarily for some animations). 37 // Hide the status (temporarily for some animations).
38 STATE_HIDDEN = 1 << 5, 38 STATE_HIDDEN = 1 << 5,
39 }; 39 };
40 40
41 ShelfButton(InkDropButtonListener* listener, ShelfView* shelf_view); 41 ShelfButton(InkDropButtonListener* listener, ShelfView* shelf_view);
42 ~ShelfButton() override; 42 ~ShelfButton() override;
43 43
44 // Sets the image to display for this entry. 44 // Sets the image to display for this entry.
45 void SetImage(const gfx::ImageSkia& image); 45 void SetImage(const gfx::ImageSkia& image);
46 46
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // If non-null the destuctor sets this to true. This is set while the menu is 119 // If non-null the destuctor sets this to true. This is set while the menu is
120 // showing and used to detect if the menu was deleted while running. 120 // showing and used to detect if the menu was deleted while running.
121 bool* destroyed_flag_; 121 bool* destroyed_flag_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(ShelfButton); 123 DISALLOW_COPY_AND_ASSIGN(ShelfButton);
124 }; 124 };
125 125
126 } // namespace ash 126 } // namespace ash
127 127
128 #endif // ASH_SHELF_SHELF_BUTTON_H_ 128 #endif // ASH_SHELF_SHELF_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_bezel_event_filter.cc ('k') | ash/shelf/shelf_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698