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

Side by Side Diff: chrome/browser/dom_ui/new_tab_ui.h

Issue 6546078: Makes a handful of DataSources not replace the existing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | 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_DOM_UI_NEW_TAB_UI_H_ 5 #ifndef CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ 6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 explicit NewTabHTMLSource(Profile* profile); 64 explicit NewTabHTMLSource(Profile* profile);
65 65
66 // Called when the network layer has requested a resource underneath 66 // Called when the network layer has requested a resource underneath
67 // the path we registered. 67 // the path we registered.
68 virtual void StartDataRequest(const std::string& path, 68 virtual void StartDataRequest(const std::string& path,
69 bool is_off_the_record, 69 bool is_off_the_record,
70 int request_id); 70 int request_id);
71 71
72 virtual std::string GetMimeType(const std::string&) const; 72 virtual std::string GetMimeType(const std::string&) const;
73 73
74 virtual bool ShouldReplaceExistingSource() const;
75
74 // Setters and getters for first_run. 76 // Setters and getters for first_run.
75 static void set_first_run(bool first_run) { first_run_ = first_run; } 77 static void set_first_run(bool first_run) { first_run_ = first_run; }
76 static bool first_run() { return first_run_; } 78 static bool first_run() { return first_run_; }
77 79
78 private: 80 private:
79 virtual ~NewTabHTMLSource() {} 81 virtual ~NewTabHTMLSource() {}
80 82
81 // Whether this is the first run. 83 // Whether this is the first run.
82 static bool first_run_; 84 static bool first_run_;
83 85
(...skipping 28 matching lines...) Expand all
112 base::TimeTicks last_paint_; 114 base::TimeTicks last_paint_;
113 // Scoping so we can be sure our timeouts don't outlive us. 115 // Scoping so we can be sure our timeouts don't outlive us.
114 base::OneShotTimer<NewTabUI> timer_; 116 base::OneShotTimer<NewTabUI> timer_;
115 // The preference version. This used for migrating prefs of the NTP. 117 // The preference version. This used for migrating prefs of the NTP.
116 static const int current_pref_version_ = 3; 118 static const int current_pref_version_ = 3;
117 119
118 DISALLOW_COPY_AND_ASSIGN(NewTabUI); 120 DISALLOW_COPY_AND_ASSIGN(NewTabUI);
119 }; 121 };
120 122
121 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ 123 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_ui/new_tab_ui.cc » ('j') | chrome/browser/sessions/session_restore_uitest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698