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

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: fix compile 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
« no previous file with comments | « ui/app_list/search_result.h ('k') | ui/app_list/search_result_list_view.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 "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::ActionIconSet::ActionIconSet(const gfx::ImageSkia& base_image,
12 const gfx::ImageSkia& hover_image,
13 const gfx::ImageSkia& pressed_image,
14 const string16& tooltip_text)
15 : base_image(base_image),
16 hover_image(hover_image),
17 pressed_image(pressed_image),
18 tooltip_text(tooltip_text) {
19 }
20
21 SearchResult::ActionIconSet::~ActionIconSet() {
22 }
23
11 SearchResult::SearchResult() { 24 SearchResult::SearchResult() {
12 } 25 }
13 26
14 SearchResult::~SearchResult() { 27 SearchResult::~SearchResult() {
15 } 28 }
16 29
17 void SearchResult::SetIcon(const gfx::ImageSkia& icon) { 30 void SearchResult::SetIcon(const gfx::ImageSkia& icon) {
18 icon_ = icon; 31 icon_ = icon;
19 FOR_EACH_OBSERVER(SearchResultObserver, 32 FOR_EACH_OBSERVER(SearchResultObserver,
20 observers_, 33 observers_,
21 OnIconChanged()); 34 OnIconChanged());
22 } 35 }
23 36
37 void SearchResult::SetActionIcons(const std::vector<ActionIconSet>& sets) {
38 action_icons_ = sets;
39 FOR_EACH_OBSERVER(SearchResultObserver,
40 observers_,
41 OnActionIconsChanged());
42 }
43
24 void SearchResult::AddObserver(SearchResultObserver* observer) { 44 void SearchResult::AddObserver(SearchResultObserver* observer) {
25 observers_.AddObserver(observer); 45 observers_.AddObserver(observer);
26 } 46 }
27 47
28 void SearchResult::RemoveObserver(SearchResultObserver* observer) { 48 void SearchResult::RemoveObserver(SearchResultObserver* observer) {
29 observers_.RemoveObserver(observer); 49 observers_.RemoveObserver(observer);
30 } 50 }
31 51
32 } // namespace app_list 52 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/search_result.h ('k') | ui/app_list/search_result_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698