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

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

Issue 23709003: Display an app's short name in the app launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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
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 <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 private: 56 private:
57 enum UIState { 57 enum UIState {
58 UI_STATE_NORMAL, // Normal UI (icon + label) 58 UI_STATE_NORMAL, // Normal UI (icon + label)
59 UI_STATE_DRAGGING, // Dragging UI (scaled icon only) 59 UI_STATE_DRAGGING, // Dragging UI (scaled icon only)
60 }; 60 };
61 61
62 // Get icon from model and schedule background processing. 62 // Get icon from model and schedule background processing.
63 void UpdateIcon(); 63 void UpdateIcon();
64 64
65 // Update the tooltip text from the model.
66 void UpdateTooltip();
67
65 void SetUIState(UIState state); 68 void SetUIState(UIState state);
66 69
67 // Sets |touch_dragging_| flag and updates UI. 70 // Sets |touch_dragging_| flag and updates UI.
68 void SetTouchDragging(bool touch_dragging); 71 void SetTouchDragging(bool touch_dragging);
69 72
70 // Invoked when |mouse_drag_timer_| fires to show dragging UI. 73 // Invoked when |mouse_drag_timer_| fires to show dragging UI.
71 void OnMouseDragTimer(); 74 void OnMouseDragTimer();
72 75
73 // AppListItemModelObserver overrides: 76 // AppListItemModelObserver overrides:
74 virtual void ItemIconChanged() OVERRIDE; 77 virtual void ItemIconChanged() OVERRIDE;
75 virtual void ItemTitleChanged() OVERRIDE; 78 virtual void ItemTitleChanged() OVERRIDE;
79 virtual void ItemFullNameChanged() OVERRIDE;
76 virtual void ItemHighlightedChanged() OVERRIDE; 80 virtual void ItemHighlightedChanged() OVERRIDE;
77 virtual void ItemIsInstallingChanged() OVERRIDE; 81 virtual void ItemIsInstallingChanged() OVERRIDE;
78 virtual void ItemPercentDownloadedChanged() OVERRIDE; 82 virtual void ItemPercentDownloadedChanged() OVERRIDE;
79 83
80 // views::View overrides: 84 // views::View overrides:
81 virtual const char* GetClassName() const OVERRIDE; 85 virtual const char* GetClassName() const OVERRIDE;
82 virtual void Layout() OVERRIDE; 86 virtual void Layout() OVERRIDE;
83 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 87 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
84 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 88 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
85 89
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 125
122 // A timer to defer showing drag UI when mouse is pressed. 126 // A timer to defer showing drag UI when mouse is pressed.
123 base::OneShotTimer<AppListItemView> mouse_drag_timer_; 127 base::OneShotTimer<AppListItemView> mouse_drag_timer_;
124 128
125 DISALLOW_COPY_AND_ASSIGN(AppListItemView); 129 DISALLOW_COPY_AND_ASSIGN(AppListItemView);
126 }; 130 };
127 131
128 } // namespace app_list 132 } // namespace app_list
129 133
130 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 134 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698