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

Unified Diff: chrome/browser/ui/app_list/start_page_service.h

Issue 871193006: Add a static Google Doodle to the experimental app list start page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_xiyuan_start_page
Patch Set: address_comments Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/app_list/start_page.js ('k') | chrome/browser/ui/app_list/start_page_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/start_page_service.h
diff --git a/chrome/browser/ui/app_list/start_page_service.h b/chrome/browser/ui/app_list/start_page_service.h
index 84590fbc0f4a10d36fbf1b45d918de077729f17f..7a7872b1c3e8eb3b058eb86c02d9eaeef8b0d563 100644
--- a/chrome/browser/ui/app_list/start_page_service.h
+++ b/chrome/browser/ui/app_list/start_page_service.h
@@ -21,6 +21,7 @@
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
+#include "net/url_request/url_fetcher_delegate.h"
#include "ui/app_list/speech_ui_model_observer.h"
namespace content {
@@ -33,6 +34,10 @@ namespace extensions {
class Extension;
}
+namespace net {
+class URLFetcher;
+}
+
class Profile;
namespace app_list {
@@ -45,6 +50,7 @@ class StartPageObserver;
// and hosts the start page contents.
class StartPageService : public KeyedService,
public content::WebContentsObserver,
+ public net::URLFetcherDelegate,
public SpeechRecognizerDelegate {
public:
typedef std::vector<scoped_refptr<const extensions::Extension> >
@@ -112,6 +118,12 @@ class StartPageService : public KeyedService,
void LoadContents();
void UnloadContents();
+ // Fetch the Google Doodle JSON data and update the app list start page.
+ void FetchDoodleJson();
+
+ // net::URLFetcherDelegate overrides:
+ void OnURLFetchComplete(const net::URLFetcher* source) override;
+
// KeyedService overrides:
void Shutdown() override;
@@ -152,6 +164,8 @@ class StartPageService : public KeyedService,
#endif
scoped_ptr<NetworkChangeObserver> network_change_observer_;
+ scoped_ptr<net::URLFetcher> doodle_fetcher_;
+
base::WeakPtrFactory<StartPageService> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(StartPageService);
« no previous file with comments | « chrome/browser/resources/app_list/start_page.js ('k') | chrome/browser/ui/app_list/start_page_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698