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"
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
) {
32 FOR_EACH_OBSERVER(SearchResultObserver
,
37 void SearchResult::SetActionIcons(const std::vector
<ActionIconSet
>& sets
) {
39 FOR_EACH_OBSERVER(SearchResultObserver
,
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() {
56 } // namespace app_list