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

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

Issue 1932433002: Update activity indicator from a light bar to a point (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add MaterialDesignController and address comments Created 4 years, 7 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/shelf/shelf_button.cc » ('j') | ash/shelf/shelf_button.cc » ('J')
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.
tdanderson 2016/05/02 17:58:35 nit: Remove "BUG=595007" from the CL title. nit:
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"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 private: 83 private:
84 class BarView; 84 class BarView;
85 85
86 // Updates the parts of the button to reflect the current |state_| and 86 // Updates the parts of the button to reflect the current |state_| and
87 // alignment. This may add or remove views, layout and paint. 87 // alignment. This may add or remove views, layout and paint.
88 void UpdateState(); 88 void UpdateState();
89 89
90 // Updates the status bar (bitmap, orientation, visibility). 90 // Updates the status bar (bitmap, orientation, visibility).
91 void UpdateBar(); 91 void UpdateBar();
92 92
93 // Creates an activity indicator image.
94 void GetIndicatorImage(gfx::Canvas& canvas);
tdanderson 2016/05/02 17:58:35 nit: I would prefer this be called something like
varkha 2016/05/02 18:13:59 Or maybe PaintIndicatorOnCanvas to self-document t
yiyix 2016/05/03 18:55:34 I agree. I changed it to PaintIndicatorOnCanvas, i
95
93 // The shelf view hosting this button. 96 // The shelf view hosting this button.
94 ShelfView* shelf_view_; 97 ShelfView* shelf_view_;
95 98
96 // The icon part of a button can be animated independently of the rest. 99 // The icon part of a button can be animated independently of the rest.
97 views::ImageView* icon_view_; 100 views::ImageView* icon_view_;
98 101
99 // Draws a bar underneath the image to represent the state of the application. 102 // Draws a bar underneath the image to represent the state of the application.
100 BarView* bar_; 103 BarView* bar_;
101 104
102 // The current application state, a bitfield of State enum values. 105 // The current application state, a bitfield of State enum values.
103 int state_; 106 int state_;
104 107
105 gfx::ShadowValues icon_shadows_; 108 gfx::ShadowValues icon_shadows_;
106 109
107 // If non-null the destuctor sets this to true. This is set while the menu is 110 // If non-null the destuctor sets this to true. This is set while the menu is
108 // showing and used to detect if the menu was deleted while running. 111 // showing and used to detect if the menu was deleted while running.
109 bool* destroyed_flag_; 112 bool* destroyed_flag_;
110 113
111 DISALLOW_COPY_AND_ASSIGN(ShelfButton); 114 DISALLOW_COPY_AND_ASSIGN(ShelfButton);
112 }; 115 };
113 116
114 } // namespace ash 117 } // namespace ash
115 118
116 #endif // ASH_SHELF_SHELF_BUTTON_H_ 119 #endif // ASH_SHELF_SHELF_BUTTON_H_
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf_button.cc » ('j') | ash/shelf/shelf_button.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698