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

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

Issue 8036002: ntp: remove ntp3 resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 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
(...skipping 28 matching lines...) Expand all
39 39
40 // Adds "url", "title", and "direction" keys on incoming dictionary, setting 40 // Adds "url", "title", and "direction" keys on incoming dictionary, setting
41 // title as the url as a fallback on empty title. 41 // title as the url as a fallback on empty title.
42 static void SetURLTitleAndDirection(base::DictionaryValue* dictionary, 42 static void SetURLTitleAndDirection(base::DictionaryValue* dictionary,
43 const string16& title, 43 const string16& title,
44 const GURL& gurl); 44 const GURL& gurl);
45 45
46 // The current preference version. 46 // The current preference version.
47 static int current_pref_version() { return current_pref_version_; } 47 static int current_pref_version() { return current_pref_version_; }
48 48
49 // Returns whether NTP4 is enabled.
50 static bool NTP4Enabled();
51
52 class NewTabHTMLSource : public ChromeURLDataManager::DataSource { 49 class NewTabHTMLSource : public ChromeURLDataManager::DataSource {
53 public: 50 public:
54 explicit NewTabHTMLSource(Profile* profile); 51 explicit NewTabHTMLSource(Profile* profile);
55 52
56 // Called when the network layer has requested a resource underneath 53 // Called when the network layer has requested a resource underneath
57 // the path we registered. 54 // the path we registered.
58 virtual void StartDataRequest(const std::string& path, 55 virtual void StartDataRequest(const std::string& path,
59 bool is_incognito, 56 bool is_incognito,
60 int request_id) OVERRIDE; 57 int request_id) OVERRIDE;
61 58
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 base::TimeTicks last_paint_; 94 base::TimeTicks last_paint_;
98 // Scoping so we can be sure our timeouts don't outlive us. 95 // Scoping so we can be sure our timeouts don't outlive us.
99 base::OneShotTimer<NewTabUI> timer_; 96 base::OneShotTimer<NewTabUI> timer_;
100 // The preference version. This used for migrating prefs of the NTP. 97 // The preference version. This used for migrating prefs of the NTP.
101 static const int current_pref_version_ = 3; 98 static const int current_pref_version_ = 3;
102 99
103 DISALLOW_COPY_AND_ASSIGN(NewTabUI); 100 DISALLOW_COPY_AND_ASSIGN(NewTabUI);
104 }; 101 };
105 102
106 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ 103 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698