| 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 CHROME_BROWSER_UI_APP_LIST_SEARCH_OMNIBOX_RESULT_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_OMNIBOX_RESULT_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_OMNIBOX_RESULT_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_OMNIBOX_RESULT_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "components/omnibox/autocomplete_match.h" | 9 #include "components/omnibox/autocomplete_match.h" |
| 10 #include "ui/app_list/search_result.h" | 10 #include "ui/app_list/search_result.h" |
| 11 | 11 |
| 12 class AppListControllerDelegate; | 12 class AppListControllerDelegate; |
| 13 class AutocompleteController; | 13 class AutocompleteController; |
| 14 class Profile; | 14 class Profile; |
| 15 | 15 |
| 16 namespace app_list { | 16 namespace app_list { |
| 17 | 17 |
| 18 class OmniboxResult : public SearchResult { | 18 class OmniboxResult : public SearchResult { |
| 19 public: | 19 public: |
| 20 OmniboxResult(Profile* profile, | 20 OmniboxResult(Profile* profile, |
| 21 AppListControllerDelegate* list_controller, | 21 AppListControllerDelegate* list_controller, |
| 22 AutocompleteController* autocomplete_controller, | 22 AutocompleteController* autocomplete_controller, |
| 23 bool is_voice_query, | 23 bool is_voice_query, |
| 24 const AutocompleteMatch& match); | 24 const AutocompleteMatch& match); |
| 25 ~OmniboxResult() override; | 25 ~OmniboxResult() override; |
| 26 | 26 |
| 27 // SearchResult overrides: | 27 // SearchResult overrides: |
| 28 void Open(int event_flags) override; | 28 void Open(int event_flags) override; |
| 29 | 29 |
| 30 scoped_ptr<SearchResult> Duplicate() override; | 30 scoped_ptr<SearchResult> Duplicate() const override; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 void UpdateIcon(); | 33 void UpdateIcon(); |
| 34 | 34 |
| 35 void UpdateTitleAndDetails(); | 35 void UpdateTitleAndDetails(); |
| 36 | 36 |
| 37 Profile* profile_; | 37 Profile* profile_; |
| 38 AppListControllerDelegate* list_controller_; | 38 AppListControllerDelegate* list_controller_; |
| 39 AutocompleteController* autocomplete_controller_; | 39 AutocompleteController* autocomplete_controller_; |
| 40 bool is_voice_query_; | 40 bool is_voice_query_; |
| 41 AutocompleteMatch match_; | 41 AutocompleteMatch match_; |
| 42 | 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(OmniboxResult); | 43 DISALLOW_COPY_AND_ASSIGN(OmniboxResult); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace app_list | 46 } // namespace app_list |
| 47 | 47 |
| 48 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_OMNIBOX_RESULT_H_ | 48 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_OMNIBOX_RESULT_H_ |
| OLD | NEW |