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

Side by Side Diff: chrome/browser/ui/webui/ntp/new_tab_ui.h

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_WEBUI_NTP_NEW_TAB_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "base/timer.h" 13 #include "base/timer.h"
14 #include "chrome/browser/sessions/tab_restore_service.h" 14 #include "chrome/browser/sessions/tab_restore_service.h"
15 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 15 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
16 #include "chrome/browser/ui/webui/chrome_web_ui.h" 16 #include "chrome/browser/ui/webui/chrome_web_ui.h"
17 #include "content/public/browser/notification_observer.h" 17 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
19 19
20 class GURL; 20 class GURL;
21 class PrefService; 21 class PrefService;
22 class Profile; 22 class Profile;
23 23
24 // The TabContents used for the New Tab page. 24 // The TabContents used for the New Tab page.
25 class NewTabUI : public ChromeWebUI, 25 class NewTabUI : public ChromeWebUI,
26 public content::NotificationObserver { 26 public content::NotificationObserver {
27 public: 27 public:
28 explicit NewTabUI(TabContents* manager); 28 explicit NewTabUI(content::WebContents* manager);
29 virtual ~NewTabUI(); 29 virtual ~NewTabUI();
30 30
31 // Override WebUI methods so we can hook up the paint timer to the render 31 // Override WebUI methods so we can hook up the paint timer to the render
32 // view host. 32 // view host.
33 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; 33 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
34 virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE; 34 virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE;
35 35
36 static void RegisterUserPrefs(PrefService* prefs); 36 static void RegisterUserPrefs(PrefService* prefs);
37 37
38 // Adds "url", "title", and "direction" keys on incoming dictionary, setting 38 // Adds "url", "title", and "direction" keys on incoming dictionary, setting
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 base::TimeTicks last_paint_; 92 base::TimeTicks last_paint_;
93 // Scoping so we can be sure our timeouts don't outlive us. 93 // Scoping so we can be sure our timeouts don't outlive us.
94 base::OneShotTimer<NewTabUI> timer_; 94 base::OneShotTimer<NewTabUI> timer_;
95 // The preference version. This used for migrating prefs of the NTP. 95 // The preference version. This used for migrating prefs of the NTP.
96 static const int current_pref_version_ = 3; 96 static const int current_pref_version_ = 3;
97 97
98 DISALLOW_COPY_AND_ASSIGN(NewTabUI); 98 DISALLOW_COPY_AND_ASSIGN(NewTabUI);
99 }; 99 };
100 100
101 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ 101 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_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