| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef ATHENA_MAIN_URL_SEARCH_PROVIDER_H_ | 5 #ifndef ATHENA_MAIN_URL_SEARCH_PROVIDER_H_ |
| 6 #define ATHENA_MAIN_URL_SEARCH_PROVIDER_H_ | 6 #define ATHENA_MAIN_URL_SEARCH_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 8 #include "ui/app_list/search_provider.h" | 9 #include "ui/app_list/search_provider.h" |
| 9 | 10 |
| 11 class TemplateURLService; |
| 12 |
| 10 namespace content { | 13 namespace content { |
| 11 class BrowserContext; | 14 class BrowserContext; |
| 12 } | 15 } |
| 13 | 16 |
| 14 namespace athena { | 17 namespace athena { |
| 15 | 18 |
| 16 // A sample search provider. | 19 // A sample search provider. |
| 17 class UrlSearchProvider : public app_list::SearchProvider { | 20 class UrlSearchProvider : public app_list::SearchProvider { |
| 18 public: | 21 public: |
| 19 UrlSearchProvider(content::BrowserContext* browser_context); | 22 UrlSearchProvider(content::BrowserContext* browser_context); |
| 20 virtual ~UrlSearchProvider(); | 23 virtual ~UrlSearchProvider(); |
| 21 | 24 |
| 22 // Overridden from app_list::SearchProvider | 25 // Overridden from app_list::SearchProvider |
| 23 virtual void Start(const base::string16& query) OVERRIDE; | 26 virtual void Start(const base::string16& query) OVERRIDE; |
| 24 virtual void Stop() OVERRIDE; | 27 virtual void Stop() OVERRIDE; |
| 25 | 28 |
| 26 private: | 29 private: |
| 27 content::BrowserContext* browser_context_; | 30 content::BrowserContext* browser_context_; |
| 28 | 31 |
| 32 // TODO(mukai): This should be provided through BrowserContextKeyedService. |
| 33 scoped_ptr<TemplateURLService> template_url_service_; |
| 34 |
| 29 DISALLOW_COPY_AND_ASSIGN(UrlSearchProvider); | 35 DISALLOW_COPY_AND_ASSIGN(UrlSearchProvider); |
| 30 }; | 36 }; |
| 31 | 37 |
| 32 } // namespace athena | 38 } // namespace athena |
| 33 | 39 |
| 34 #endif // ATHENA_MAIN_URL_SEARCH_PROVIDER_H_ | 40 #endif // ATHENA_MAIN_URL_SEARCH_PROVIDER_H_ |
| OLD | NEW |