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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.h

Issue 9358073: First version of the time slicing on the urls. Not ready for review yet. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added relative time to time slicing Created 8 years, 10 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/ui/webui/ntp/new_tab_page_handler.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/new_tab_ui.h
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.h b/chrome/browser/ui/webui/ntp/new_tab_ui.h
index 9cd11b5b7d3779dc6f2f54420a849f4f5cc955a7..2833b2587b46bf3947927b24d52fef18661f8619 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.h
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_
#pragma once
+#include <map>
#include <string>
#include "base/gtest_prod_util.h"
@@ -41,6 +42,9 @@ class NewTabUI : public content::WebUIController,
// Returns whether or not to show the app install hint.
static bool ShouldShowAppInstallHint();
+ // Returns whether or not the "suggestions links page" is enabled.
+ static bool IsSuggestionsPageEnabled();
+
// Adds "url", "title", and "direction" keys on incoming dictionary, setting
// title as the url as a fallback on empty title.
static void SetURLTitleAndDirection(base::DictionaryValue* dictionary,
@@ -79,11 +83,20 @@ class NewTabUI : public content::WebUIController,
virtual bool ShouldReplaceExistingSource() const OVERRIDE;
+ // Adds |resource| to the source. |resource_id| is resource id or 0,
+ // which means return empty data set. |mime_type| is mime type of the
+ // resource.
+ void AddResource(const char* resource,
+ const char *mime_type,
+ int resource_id);
+
private:
virtual ~NewTabHTMLSource() {}
// Pointer back to the original profile.
Profile* profile_;
+ // Maps resource files to mime types an resource ids.
+ std::map<std::string, std::pair<std::string, int> > resource_map_;
DISALLOW_COPY_AND_ASSIGN(NewTabHTMLSource);
};
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_page_handler.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698