Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/ui/app_list/search/app_result.h

Issue 379333005: Allow AppSearchProvider to provide recommendations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/search/app_result.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "chrome/browser/ui/app_list/app_context_menu_delegate.h" 11 #include "chrome/browser/ui/app_list/app_context_menu_delegate.h"
12 #include "chrome/browser/ui/app_list/search/chrome_search_result.h" 12 #include "chrome/browser/ui/app_list/search/chrome_search_result.h"
13 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h" 13 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
14 #include "extensions/browser/extension_icon_image.h" 14 #include "extensions/browser/extension_icon_image.h"
15 #include "extensions/browser/extension_registry_observer.h" 15 #include "extensions/browser/extension_registry_observer.h"
16 16
17 class AppListControllerDelegate; 17 class AppListControllerDelegate;
18 class ExtensionEnableFlow; 18 class ExtensionEnableFlow;
19 class Profile; 19 class Profile;
20 20
21 namespace base {
22 class Time;
23 }
24
21 namespace extensions { 25 namespace extensions {
22 class ExtensionRegistry; 26 class ExtensionRegistry;
23 } 27 }
24 28
25 namespace app_list { 29 namespace app_list {
26 30
27 class AppContextMenu; 31 class AppContextMenu;
28 class TokenizedString; 32 class TokenizedString;
29 class TokenizedStringMatch; 33 class TokenizedStringMatch;
30 34
31 class AppResult : public ChromeSearchResult, 35 class AppResult : public ChromeSearchResult,
32 public extensions::IconImage::Observer, 36 public extensions::IconImage::Observer,
33 public AppContextMenuDelegate, 37 public AppContextMenuDelegate,
34 public ExtensionEnableFlowDelegate, 38 public ExtensionEnableFlowDelegate,
35 public extensions::ExtensionRegistryObserver { 39 public extensions::ExtensionRegistryObserver {
36 public: 40 public:
37 AppResult(Profile* profile, 41 AppResult(Profile* profile,
38 const std::string& app_id, 42 const std::string& app_id,
39 AppListControllerDelegate* controller); 43 AppListControllerDelegate* controller);
40 virtual ~AppResult(); 44 virtual ~AppResult();
41 45
42 void UpdateFromMatch(const TokenizedString& title, 46 void UpdateFromMatch(const TokenizedString& title,
43 const TokenizedStringMatch& match); 47 const TokenizedStringMatch& match);
44 48
49 void UpdateFromLastLaunched(const base::Time& current_time,
50 const base::Time& last_launched);
51
45 // ChromeSearchResult overides: 52 // ChromeSearchResult overides:
46 virtual void Open(int event_flags) OVERRIDE; 53 virtual void Open(int event_flags) OVERRIDE;
47 virtual void InvokeAction(int action_index, int event_flags) OVERRIDE; 54 virtual void InvokeAction(int action_index, int event_flags) OVERRIDE;
48 virtual scoped_ptr<ChromeSearchResult> Duplicate() OVERRIDE; 55 virtual scoped_ptr<ChromeSearchResult> Duplicate() OVERRIDE;
49 virtual ui::MenuModel* GetContextMenuModel() OVERRIDE; 56 virtual ui::MenuModel* GetContextMenuModel() OVERRIDE;
50 virtual ChromeSearchResultType GetType() OVERRIDE; 57 virtual ChromeSearchResultType GetType() OVERRIDE;
51 58
52 private: 59 private:
53 void StartObservingExtensionRegistry(); 60 void StartObservingExtensionRegistry();
54 void StopObservingExtensionRegistry(); 61 void StopObservingExtensionRegistry();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 scoped_ptr<ExtensionEnableFlow> extension_enable_flow_; 99 scoped_ptr<ExtensionEnableFlow> extension_enable_flow_;
93 100
94 extensions::ExtensionRegistry* extension_registry_; 101 extensions::ExtensionRegistry* extension_registry_;
95 102
96 DISALLOW_COPY_AND_ASSIGN(AppResult); 103 DISALLOW_COPY_AND_ASSIGN(AppResult);
97 }; 104 };
98 105
99 } // namespace app_list 106 } // namespace app_list
100 107
101 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_RESULT_H_ 108 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_RESULT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/search/app_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698