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

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

Issue 9303005: [NTP4] Experiment for adding Chrome Web Store link to footer. (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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"
(...skipping 11 matching lines...) Expand all
23 23
24 // The TabContents used for the New Tab page. 24 // The TabContents used for the New Tab page.
25 class NewTabUI : public content::WebUIController, 25 class NewTabUI : public content::WebUIController,
26 public content::NotificationObserver { 26 public content::NotificationObserver {
27 public: 27 public:
28 explicit NewTabUI(content::WebUI* web_ui); 28 explicit NewTabUI(content::WebUI* web_ui);
29 virtual ~NewTabUI(); 29 virtual ~NewTabUI();
30 30
31 static void RegisterUserPrefs(PrefService* prefs); 31 static void RegisterUserPrefs(PrefService* prefs);
32 32
33 // Sets up any experiment in which the NTP might want to participate.
34 // The CWS footer link is one such example.
35 static void SetupFieldTrials();
36
37 // Returns whether or not the CWS footer experiment is enabled.
38 static bool IsWebStoreExperimentEnabled();
39
33 // Adds "url", "title", and "direction" keys on incoming dictionary, setting 40 // Adds "url", "title", and "direction" keys on incoming dictionary, setting
34 // title as the url as a fallback on empty title. 41 // title as the url as a fallback on empty title.
35 static void SetURLTitleAndDirection(base::DictionaryValue* dictionary, 42 static void SetURLTitleAndDirection(base::DictionaryValue* dictionary,
36 const string16& title, 43 const string16& title,
37 const GURL& gurl); 44 const GURL& gurl);
38 45
39 // Returns a pointer to a NewTabUI if the WebUIController object is a new tab 46 // Returns a pointer to a NewTabUI if the WebUIController object is a new tab
40 // page. 47 // page.
41 static NewTabUI* FromWebUIController(content::WebUIController* ui); 48 static NewTabUI* FromWebUIController(content::WebUIController* ui);
42 49
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 base::TimeTicks last_paint_; 104 base::TimeTicks last_paint_;
98 // Scoping so we can be sure our timeouts don't outlive us. 105 // Scoping so we can be sure our timeouts don't outlive us.
99 base::OneShotTimer<NewTabUI> timer_; 106 base::OneShotTimer<NewTabUI> timer_;
100 // The preference version. This used for migrating prefs of the NTP. 107 // The preference version. This used for migrating prefs of the NTP.
101 static const int current_pref_version_ = 3; 108 static const int current_pref_version_ = 3;
102 109
103 DISALLOW_COPY_AND_ASSIGN(NewTabUI); 110 DISALLOW_COPY_AND_ASSIGN(NewTabUI);
104 }; 111 };
105 112
106 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ 113 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/recently_closed.css ('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