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

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

Issue 10872099: ash: Add support for additional icons in apps search list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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 "ui/app_list/search_result_observer.h" 7 #include "ui/app_list/search_result_observer.h"
8 8
9 namespace app_list { 9 namespace app_list {
10 10
11 SearchResult::SearchResult() { 11 SearchResult::SearchResult() {
12 } 12 }
13 13
14 SearchResult::~SearchResult() { 14 SearchResult::~SearchResult() {
15 } 15 }
16 16
17 void SearchResult::SetIcon(const gfx::ImageSkia& icon) { 17 void SearchResult::SetIcon(const gfx::ImageSkia& icon) {
18 icon_ = icon; 18 icon_ = icon;
19 FOR_EACH_OBSERVER(SearchResultObserver, 19 FOR_EACH_OBSERVER(SearchResultObserver,
20 observers_, 20 observers_,
21 OnIconChanged()); 21 OnIconChanged());
22 } 22 }
23 23
24 void SearchResult::SetActionIcons(const std::vector<ActionIconSet>& sets) {
25 action_icons_ = sets;
26 FOR_EACH_OBSERVER(SearchResultObserver,
27 observers_,
28 OnActionIconsChanged());
29 }
30
24 void SearchResult::AddObserver(SearchResultObserver* observer) { 31 void SearchResult::AddObserver(SearchResultObserver* observer) {
25 observers_.AddObserver(observer); 32 observers_.AddObserver(observer);
26 } 33 }
27 34
28 void SearchResult::RemoveObserver(SearchResultObserver* observer) { 35 void SearchResult::RemoveObserver(SearchResultObserver* observer) {
29 observers_.RemoveObserver(observer); 36 observers_.RemoveObserver(observer);
30 } 37 }
31 38
32 } // namespace app_list 39 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698