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

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

Issue 15342003: app_list: Add web store search. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and address nits in #3 Created 7 years, 7 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
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_RESULT_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_RESULT_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/ui/app_list/search/chrome_search_result.h"
13 #include "googleurl/src/gurl.h"
14
15 class Profile;
16
17 namespace app_list {
18
19 class WebstoreResult : public ChromeSearchResult {
20 public:
21 WebstoreResult(Profile* profile,
22 const std::string& app_id,
23 const std::string& localized_name,
24 const GURL& icon_url);
25 virtual ~WebstoreResult();
26
27 // ChromeSearchResult overides:
28 virtual void Open(int event_flags) OVERRIDE;
29 virtual void InvokeAction(int action_index, int event_flags) OVERRIDE;
30 virtual scoped_ptr<ChromeSearchResult> Duplicate() OVERRIDE;
31
32 private:
33 void SetDefaultDetails();
34 void OnIconLoaded();
35
36 Profile* profile_;
37 const std::string app_id_;
38 const std::string localized_name_;
39 const GURL icon_url_;
40
41 gfx::ImageSkia icon_;
42 base::WeakPtrFactory<WebstoreResult> weak_factory_;
43
44 DISALLOW_COPY_AND_ASSIGN(WebstoreResult);
45 };
46
47 } // namespace app_list
48
49 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_RESULT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698