OLD | NEW |
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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 void SetTouchDragging(bool touch_dragging); | 100 void SetTouchDragging(bool touch_dragging); |
101 | 101 |
102 // Invoked when |mouse_drag_timer_| fires to show dragging UI. | 102 // Invoked when |mouse_drag_timer_| fires to show dragging UI. |
103 void OnMouseDragTimer(); | 103 void OnMouseDragTimer(); |
104 | 104 |
105 // If the item is not in a folder, not highlighted, not being dragged, and not | 105 // If the item is not in a folder, not highlighted, not being dragged, and not |
106 // having something dropped onto it, enables subpixel AA for the title. | 106 // having something dropped onto it, enables subpixel AA for the title. |
107 void SetTitleSubpixelAA(); | 107 void SetTitleSubpixelAA(); |
108 | 108 |
109 // views::View overrides: | 109 // views::View overrides: |
110 virtual const char* GetClassName() const OVERRIDE; | 110 virtual const char* GetClassName() const override; |
111 virtual void Layout() OVERRIDE; | 111 virtual void Layout() override; |
112 virtual void SchedulePaintInRect(const gfx::Rect& r) OVERRIDE; | 112 virtual void SchedulePaintInRect(const gfx::Rect& r) override; |
113 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 113 virtual void OnPaint(gfx::Canvas* canvas) override; |
114 | 114 |
115 // views::ContextMenuController overrides: | 115 // views::ContextMenuController overrides: |
116 virtual void ShowContextMenuForView(views::View* source, | 116 virtual void ShowContextMenuForView(views::View* source, |
117 const gfx::Point& point, | 117 const gfx::Point& point, |
118 ui::MenuSourceType source_type) OVERRIDE; | 118 ui::MenuSourceType source_type) override; |
119 | 119 |
120 // views::CustomButton overrides: | 120 // views::CustomButton overrides: |
121 virtual void StateChanged() OVERRIDE; | 121 virtual void StateChanged() override; |
122 virtual bool ShouldEnterPushedState(const ui::Event& event) OVERRIDE; | 122 virtual bool ShouldEnterPushedState(const ui::Event& event) override; |
123 | 123 |
124 // views::View overrides: | 124 // views::View overrides: |
125 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 125 virtual bool OnKeyPressed(const ui::KeyEvent& event) override; |
126 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 126 virtual bool OnMousePressed(const ui::MouseEvent& event) override; |
127 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 127 virtual void OnMouseReleased(const ui::MouseEvent& event) override; |
128 virtual void OnMouseCaptureLost() OVERRIDE; | 128 virtual void OnMouseCaptureLost() override; |
129 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; | 129 virtual bool OnMouseDragged(const ui::MouseEvent& event) override; |
130 | 130 |
131 // ui::EventHandler overrides: | 131 // ui::EventHandler overrides: |
132 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 132 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
133 | 133 |
134 // AppListItemObserver overrides: | 134 // AppListItemObserver overrides: |
135 virtual void ItemIconChanged() OVERRIDE; | 135 virtual void ItemIconChanged() override; |
136 virtual void ItemNameChanged() OVERRIDE; | 136 virtual void ItemNameChanged() override; |
137 virtual void ItemIsInstallingChanged() OVERRIDE; | 137 virtual void ItemIsInstallingChanged() override; |
138 virtual void ItemPercentDownloadedChanged() OVERRIDE; | 138 virtual void ItemPercentDownloadedChanged() override; |
139 virtual void ItemBeingDestroyed() OVERRIDE; | 139 virtual void ItemBeingDestroyed() override; |
140 | 140 |
141 const bool is_folder_; | 141 const bool is_folder_; |
142 const bool is_in_folder_; | 142 const bool is_in_folder_; |
143 | 143 |
144 AppListItem* item_weak_; // Owned by AppListModel. Can be NULL. | 144 AppListItem* item_weak_; // Owned by AppListModel. Can be NULL. |
145 | 145 |
146 AppsGridView* apps_grid_view_; // Parent view, owns this. | 146 AppsGridView* apps_grid_view_; // Parent view, owns this. |
147 views::ImageView* icon_; // Strongly typed child view. | 147 views::ImageView* icon_; // Strongly typed child view. |
148 CachedLabel* title_; // Strongly typed child view. | 148 CachedLabel* title_; // Strongly typed child view. |
149 ProgressBarView* progress_bar_; // Strongly typed child view. | 149 ProgressBarView* progress_bar_; // Strongly typed child view. |
(...skipping 10 matching lines...) Expand all Loading... |
160 | 160 |
161 // A timer to defer showing drag UI when mouse is pressed. | 161 // A timer to defer showing drag UI when mouse is pressed. |
162 base::OneShotTimer<AppListItemView> mouse_drag_timer_; | 162 base::OneShotTimer<AppListItemView> mouse_drag_timer_; |
163 | 163 |
164 DISALLOW_COPY_AND_ASSIGN(AppListItemView); | 164 DISALLOW_COPY_AND_ASSIGN(AppListItemView); |
165 }; | 165 }; |
166 | 166 |
167 } // namespace app_list | 167 } // namespace app_list |
168 | 168 |
169 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ | 169 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ |
OLD | NEW |