When Retrier succeeds, record errors it encountered.
[chromium-blink-merge.git] / ui / app_list / search_result.cc
blob2d62af5cf2b26e659bc1bdef4c0c4431fc02544b
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
3 // found in the LICENSE file.
5 #include "ui/app_list/search_result.h"
7 #include "ui/app_list/search_result_observer.h"
9 namespace app_list {
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) {
21 SearchResult::ActionIconSet::~ActionIconSet() {
24 SearchResult::SearchResult() {
27 SearchResult::~SearchResult() {
30 void SearchResult::SetIcon(const gfx::ImageSkia& icon) {
31 icon_ = icon;
32 FOR_EACH_OBSERVER(SearchResultObserver,
33 observers_,
34 OnIconChanged());
37 void SearchResult::SetActionIcons(const std::vector<ActionIconSet>& sets) {
38 action_icons_ = sets;
39 FOR_EACH_OBSERVER(SearchResultObserver,
40 observers_,
41 OnActionIconsChanged());
44 void SearchResult::AddObserver(SearchResultObserver* observer) {
45 observers_.AddObserver(observer);
48 void SearchResult::RemoveObserver(SearchResultObserver* observer) {
49 observers_.RemoveObserver(observer);
52 ui::MenuModel* SearchResult::GetContextMenuModel() {
53 return NULL;
56 } // namespace app_list