OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_APP_RESULT_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_RESULT_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_RESULT_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_RESULT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class Time; | 22 class Time; |
23 } | 23 } |
24 | 24 |
25 namespace extensions { | 25 namespace extensions { |
26 class ExtensionRegistry; | 26 class ExtensionRegistry; |
27 } | 27 } |
28 | 28 |
29 namespace app_list { | 29 namespace app_list { |
30 | 30 |
31 class AppContextMenu; | 31 class AppContextMenu; |
32 class TokenizedString; | |
33 class TokenizedStringMatch; | |
34 | 32 |
35 class AppResult : public SearchResult, | 33 class AppResult : public SearchResult, |
36 public extensions::IconImage::Observer, | 34 public extensions::IconImage::Observer, |
37 public AppContextMenuDelegate, | 35 public AppContextMenuDelegate, |
38 public ExtensionEnableFlowDelegate, | 36 public ExtensionEnableFlowDelegate, |
39 public extensions::ExtensionRegistryObserver { | 37 public extensions::ExtensionRegistryObserver { |
40 public: | 38 public: |
41 AppResult(Profile* profile, | 39 AppResult(Profile* profile, |
42 const std::string& app_id, | 40 const std::string& app_id, |
43 AppListControllerDelegate* controller, | 41 AppListControllerDelegate* controller, |
44 bool is_recommendation); | 42 bool is_recommendation); |
45 ~AppResult() override; | 43 ~AppResult() override; |
46 | 44 |
47 void UpdateFromMatch(const TokenizedString& title, | |
48 const TokenizedStringMatch& match); | |
49 | |
50 void UpdateFromLastLaunched(const base::Time& current_time, | 45 void UpdateFromLastLaunched(const base::Time& current_time, |
51 const base::Time& last_launched); | 46 const base::Time& last_launched); |
52 | 47 |
53 // SearchResult overrides: | 48 // SearchResult overrides: |
54 void Open(int event_flags) override; | 49 void Open(int event_flags) override; |
55 scoped_ptr<SearchResult> Duplicate() const override; | 50 scoped_ptr<SearchResult> Duplicate() const override; |
56 ui::MenuModel* GetContextMenuModel() override; | 51 ui::MenuModel* GetContextMenuModel() override; |
57 | 52 |
58 private: | 53 private: |
59 void StartObservingExtensionRegistry(); | 54 void StartObservingExtensionRegistry(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 scoped_ptr<ExtensionEnableFlow> extension_enable_flow_; | 87 scoped_ptr<ExtensionEnableFlow> extension_enable_flow_; |
93 | 88 |
94 extensions::ExtensionRegistry* extension_registry_; | 89 extensions::ExtensionRegistry* extension_registry_; |
95 | 90 |
96 DISALLOW_COPY_AND_ASSIGN(AppResult); | 91 DISALLOW_COPY_AND_ASSIGN(AppResult); |
97 }; | 92 }; |
98 | 93 |
99 } // namespace app_list | 94 } // namespace app_list |
100 | 95 |
101 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_RESULT_H_ | 96 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_RESULT_H_ |
OLD | NEW |