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

Side by Side Diff: ui/app_list/search_result.cc

Issue 2920393002: Implementing answer card hover highlight. (Closed)
Patch Set: CR comments 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/search_result.h ('k') | ui/app_list/search_result_observer.h » ('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 #include "ui/app_list/search_result.h" 5 #include "ui/app_list/search_result.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "ui/app_list/app_list_constants.h" 9 #include "ui/app_list/app_list_constants.h"
10 #include "ui/app_list/search/tokenized_string.h" 10 #include "ui/app_list/search/tokenized_string.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 for (auto& observer : observers_) 50 for (auto& observer : observers_)
51 observer.OnIconChanged(); 51 observer.OnIconChanged();
52 } 52 }
53 53
54 void SearchResult::SetBadgeIcon(const gfx::ImageSkia& badge_icon) { 54 void SearchResult::SetBadgeIcon(const gfx::ImageSkia& badge_icon) {
55 badge_icon_ = badge_icon; 55 badge_icon_ = badge_icon;
56 for (auto& observer : observers_) 56 for (auto& observer : observers_)
57 observer.OnBadgeIconChanged(); 57 observer.OnBadgeIconChanged();
58 } 58 }
59 59
60 void SearchResult::SetIsMouseInView(bool mouse_is_inside) {
61 mouse_is_in_view_ = mouse_is_inside;
62 for (auto& observer : observers_)
63 observer.OnViewHoverStateChanged();
64 }
65
60 void SearchResult::SetActions(const Actions& sets) { 66 void SearchResult::SetActions(const Actions& sets) {
61 actions_ = sets; 67 actions_ = sets;
62 for (auto& observer : observers_) 68 for (auto& observer : observers_)
63 observer.OnActionsChanged(); 69 observer.OnActionsChanged();
64 } 70 }
65 71
66 void SearchResult::SetIsInstalling(bool is_installing) { 72 void SearchResult::SetIsInstalling(bool is_installing) {
67 if (is_installing_ == is_installing) 73 if (is_installing_ == is_installing)
68 return; 74 return;
69 75
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 164 }
159 165
160 // Insert the delimiters (in reverse order, to preserve indices). 166 // Insert the delimiters (in reverse order, to preserve indices).
161 for (auto it = inserts.rbegin(); it != inserts.rend(); ++it) 167 for (auto it = inserts.rbegin(); it != inserts.rend(); ++it)
162 result.insert(it->first, it->second); 168 result.insert(it->first, it->second);
163 169
164 return result; 170 return result;
165 } 171 }
166 172
167 } // namespace app_list 173 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/search_result.h ('k') | ui/app_list/search_result_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698