diff options
Diffstat (limited to 'chrome/browser/ui/webui/ntp/new_tab_ui.h')
| -rw-r--r-- | chrome/browser/ui/webui/ntp/new_tab_ui.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.h b/chrome/browser/ui/webui/ntp/new_tab_ui.h index 401b687..05e9e6f 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.h +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.h @@ -28,11 +28,6 @@ class NewTabUI : public ChromeWebUI, explicit NewTabUI(content::WebContents* manager); virtual ~NewTabUI(); - // Override WebUI methods so we can hook up the paint timer to the render - // view host. - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE; - static void RegisterUserPrefs(PrefService* prefs); // Adds "url", "title", and "direction" keys on incoming dictionary, setting @@ -41,9 +36,21 @@ class NewTabUI : public ChromeWebUI, const string16& title, const GURL& gurl); + // Returns a pointer to a NewTabUI if the WebUI object is a new tab page. + static NewTabUI* FromWebUI(WebUI* ui); + // The current preference version. static int current_pref_version() { return current_pref_version_; } + // Override WebUI methods so we can hook up the paint timer to the render + // view host. + virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE; + + // Returns true if the bookmark bar can be displayed over this webui, detached + // from the location bar. + bool CanShowBookmarkBar() const; + class NewTabHTMLSource : public ChromeURLDataManager::DataSource { public: explicit NewTabHTMLSource(Profile* profile); @@ -80,10 +87,6 @@ class NewTabUI : public ChromeWebUI, void StartTimingPaint(RenderViewHost* render_view_host); void PaintTimeout(); - // Overridden from ChromeWebUI. Determines if the bookmarks bar can be shown - // detached from the location bar. - virtual bool CanShowBookmarkBar() const OVERRIDE; - content::NotificationRegistrar registrar_; // The time when we started benchmarking. |
