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

Side by Side Diff: ui/app_list/views/app_list_item_view.h

Issue 2945343003: cros: update app list item view for all apps grid view (Closed)
Patch Set: feedback Created 3 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 | « ui/app_list/app_list_constants.cc ('k') | ui/app_list/views/app_list_item_view.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 UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
6 #define UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 ui::MenuSourceType source_type) override; 120 ui::MenuSourceType source_type) override;
121 121
122 // views::CustomButton overrides: 122 // views::CustomButton overrides:
123 void StateChanged(ButtonState old_state) override; 123 void StateChanged(ButtonState old_state) override;
124 bool ShouldEnterPushedState(const ui::Event& event) override; 124 bool ShouldEnterPushedState(const ui::Event& event) override;
125 void PaintButtonContents(gfx::Canvas* canvas) override; 125 void PaintButtonContents(gfx::Canvas* canvas) override;
126 126
127 // views::View overrides: 127 // views::View overrides:
128 const char* GetClassName() const override; 128 const char* GetClassName() const override;
129 void Layout() override; 129 void Layout() override;
130 gfx::Size CalculatePreferredSize() const override;
130 bool OnKeyPressed(const ui::KeyEvent& event) override; 131 bool OnKeyPressed(const ui::KeyEvent& event) override;
131 bool OnMousePressed(const ui::MouseEvent& event) override; 132 bool OnMousePressed(const ui::MouseEvent& event) override;
132 void OnMouseReleased(const ui::MouseEvent& event) override; 133 void OnMouseReleased(const ui::MouseEvent& event) override;
133 bool OnMouseDragged(const ui::MouseEvent& event) override; 134 bool OnMouseDragged(const ui::MouseEvent& event) override;
134 135
135 // AppListItemObserver overrides: 136 // AppListItemObserver overrides:
136 void ItemIconChanged() override; 137 void ItemIconChanged() override;
137 void ItemNameChanged() override; 138 void ItemNameChanged() override;
138 void ItemIsInstallingChanged() override; 139 void ItemIsInstallingChanged() override;
139 void ItemPercentDownloadedChanged() override; 140 void ItemPercentDownloadedChanged() override;
140 void ItemBeingDestroyed() override; 141 void ItemBeingDestroyed() override;
141 142
142 const bool is_folder_; 143 const bool is_folder_;
143 const bool is_in_folder_; 144 const bool is_in_folder_;
144 145
145 AppListItem* item_weak_; // Owned by AppListModel. Can be NULL. 146 AppListItem* item_weak_; // Owned by AppListModel. Can be NULL.
146 147
147 AppsGridView* apps_grid_view_; // Parent view, owns this. 148 AppsGridView* apps_grid_view_; // Parent view, owns this.
148 views::ImageView* icon_; // Strongly typed child view. 149 views::ImageView* icon_; // Strongly typed child view.
149 views::Label* title_; // Strongly typed child view. 150 views::Label* title_; // Strongly typed child view.
150 views::ProgressBar* progress_bar_; // Strongly typed child view. 151 views::ProgressBar* progress_bar_; // Strongly typed child view.
151 152
152 std::unique_ptr<views::MenuRunner> context_menu_runner_; 153 std::unique_ptr<views::MenuRunner> context_menu_runner_;
153 154
154 UIState ui_state_; 155 UIState ui_state_ = UI_STATE_NORMAL;
155 156
156 // True if scroll gestures should contribute to dragging. 157 // True if scroll gestures should contribute to dragging.
157 bool touch_dragging_; 158 bool touch_dragging_ = false;
158 159
159 ImageShadowAnimator shadow_animator_; 160 ImageShadowAnimator shadow_animator_;
160 161
161 bool is_installing_; 162 bool is_installing_ = false;
162 bool is_highlighted_; 163 bool is_highlighted_ = false;
164
165 const bool is_fullscreen_app_list_enabled_;
163 166
164 base::string16 tooltip_text_; 167 base::string16 tooltip_text_;
165 168
166 // A timer to defer showing drag UI when mouse is pressed. 169 // A timer to defer showing drag UI when mouse is pressed.
167 base::OneShotTimer mouse_drag_timer_; 170 base::OneShotTimer mouse_drag_timer_;
168 171
169 DISALLOW_COPY_AND_ASSIGN(AppListItemView); 172 DISALLOW_COPY_AND_ASSIGN(AppListItemView);
170 }; 173 };
171 174
172 } // namespace app_list 175 } // namespace app_list
173 176
174 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 177 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/app_list_constants.cc ('k') | ui/app_list/views/app_list_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698