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

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

Issue 2727073002: Preliminary cleanup of ShelfButton activity/status indicator. (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « no previous file | ash/common/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_COMMON_SHELF_SHELF_BUTTON_H_ 5 #ifndef ASH_COMMON_SHELF_SHELF_BUTTON_H_
6 #define ASH_COMMON_SHELF_SHELF_BUTTON_H_ 6 #define ASH_COMMON_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"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // views::CustomButton overrides: 87 // views::CustomButton overrides:
88 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; 88 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
89 bool ShouldEnterPushedState(const ui::Event& event) override; 89 bool ShouldEnterPushedState(const ui::Event& event) override;
90 std::unique_ptr<views::InkDrop> CreateInkDrop() override; 90 std::unique_ptr<views::InkDrop> CreateInkDrop() override;
91 void NotifyClick(const ui::Event& event) override; 91 void NotifyClick(const ui::Event& event) override;
92 92
93 // Sets the icon image with a shadow. 93 // Sets the icon image with a shadow.
94 void SetShadowedImage(const gfx::ImageSkia& bitmap); 94 void SetShadowedImage(const gfx::ImageSkia& bitmap);
95 95
96 private: 96 private:
97 class BarView; 97 class AppStatusIndicatorView;
98 98
99 // Updates the parts of the button to reflect the current |state_| and 99 // Updates the parts of the button to reflect the current |state_| and
100 // alignment. This may add or remove views, layout and paint. 100 // alignment. This may add or remove views, layout and paint.
101 void UpdateState(); 101 void UpdateState();
102 102
103 // Updates the status bar (bitmap, orientation, visibility).
104 void UpdateBar();
105
106 InkDropButtonListener* listener_; 103 InkDropButtonListener* listener_;
107 104
108 // The shelf view hosting this button. 105 // The shelf view hosting this button.
109 ShelfView* shelf_view_; 106 ShelfView* shelf_view_;
110 107
111 // The icon part of a button can be animated independently of the rest. 108 // The icon part of a button can be animated independently of the rest.
112 views::ImageView* icon_view_; 109 views::ImageView* icon_view_;
113 110
114 // Draws a bar underneath the image to represent the state of the application. 111 // Draws an indicator underneath the image to represent the state of the
115 BarView* bar_; 112 // application.
113 AppStatusIndicatorView* indicator_;
116 114
117 // The current application state, a bitfield of State enum values. 115 // The current application state, a bitfield of State enum values.
118 int state_; 116 int state_;
119 117
120 gfx::ShadowValues icon_shadows_; 118 gfx::ShadowValues icon_shadows_;
121 119
122 // If non-null the destuctor sets this to true. This is set while the menu is 120 // If non-null the destuctor sets this to true. This is set while the menu is
123 // showing and used to detect if the menu was deleted while running. 121 // showing and used to detect if the menu was deleted while running.
124 bool* destroyed_flag_; 122 bool* destroyed_flag_;
125 123
126 DISALLOW_COPY_AND_ASSIGN(ShelfButton); 124 DISALLOW_COPY_AND_ASSIGN(ShelfButton);
127 }; 125 };
128 126
129 } // namespace ash 127 } // namespace ash
130 128
131 #endif // ASH_COMMON_SHELF_SHELF_BUTTON_H_ 129 #endif // ASH_COMMON_SHELF_SHELF_BUTTON_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/shelf/shelf_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698