Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / app_list / search / search_provider.cc
blob688d1b82fb71d9a13bbe5dc11f025a08a54b0798
1 // Copyright 2013 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 "chrome/browser/ui/app_list/search/search_provider.h"
7 #include "chrome/browser/ui/app_list/search/chrome_search_result.h"
8 #include "ui/app_list/search_result.h"
10 namespace app_list {
12 SearchProvider::SearchProvider() {}
13 SearchProvider::~SearchProvider() {}
15 void SearchProvider::Add(scoped_ptr<ChromeSearchResult> result) {
16 results_.push_back(result.release());
17 FireResultChanged();
20 void SearchProvider::ClearResults() {
21 results_.clear();
22 FireResultChanged();
25 void SearchProvider::FireResultChanged() {
26 if (result_changed_callback_.is_null())
27 return;
29 result_changed_callback_.Run();
32 } // namespace app_list