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 #include "ui/app_list/views/app_list_item_view.h" | 5 #include "ui/app_list/views/app_list_item_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 icon_shadows_)); | 127 icon_shadows_)); |
128 icon_->SetImage(shadow); | 128 icon_->SetImage(shadow); |
129 return; | 129 return; |
130 }; | 130 }; |
131 | 131 |
132 icon_->SetImage(resized); | 132 icon_->SetImage(resized); |
133 } | 133 } |
134 | 134 |
135 void AppListItemView::UpdateTooltip() { | 135 void AppListItemView::UpdateTooltip() { |
136 title_->SetTooltipText(model_->title() == model_->full_name() ? | 136 title_->SetTooltipText(model_->title() == model_->full_name() ? |
137 string16() : UTF8ToUTF16(model_->full_name())); | 137 base::string16() : UTF8ToUTF16(model_->full_name())); |
138 } | 138 } |
139 | 139 |
140 void AppListItemView::SetUIState(UIState state) { | 140 void AppListItemView::SetUIState(UIState state) { |
141 if (ui_state_ == state) | 141 if (ui_state_ == state) |
142 return; | 142 return; |
143 | 143 |
144 ui_state_ = state; | 144 ui_state_ = state; |
145 | 145 |
146 #if defined(USE_AURA) | 146 #if defined(USE_AURA) |
147 switch (ui_state_) { | 147 switch (ui_state_) { |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 } | 457 } |
458 if (!event->handled()) | 458 if (!event->handled()) |
459 CustomButton::OnGestureEvent(event); | 459 CustomButton::OnGestureEvent(event); |
460 } | 460 } |
461 | 461 |
462 void AppListItemView::OnSyncDragEnd() { | 462 void AppListItemView::OnSyncDragEnd() { |
463 SetUIState(UI_STATE_NORMAL); | 463 SetUIState(UI_STATE_NORMAL); |
464 } | 464 } |
465 | 465 |
466 } // namespace app_list | 466 } // namespace app_list |
OLD | NEW |