summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/new_tab_ui.h
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 20:18:09 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 20:18:09 +0000
commit6fe0bad0e5215b8837e0673e60afc4b7c73cac21 (patch)
tree9470d12a86d408e6e6c72631e054616a4531a6d2 /chrome/browser/dom_ui/new_tab_ui.h
parentab8fa0c51059c27a8bd4200899a3688e50a1393c (diff)
downloadchromium_src-6fe0bad0e5215b8837e0673e60afc4b7c73cac21.zip
chromium_src-6fe0bad0e5215b8837e0673e60afc4b7c73cac21.tar.gz
chromium_src-6fe0bad0e5215b8837e0673e60afc4b7c73cac21.tar.bz2
Add mimetypes on the "chrome-resource://" responses.
This is necessary to get javascript debugger loading CSS, post-webkit-merge. http://code.google.com/p/chromium/issues/detail?id=4181 Review URL: http://codereview.chromium.org/10941 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/new_tab_ui.h')
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index aab91f2..ed31cde 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -36,6 +36,10 @@ class NewTabHTMLSource : public ChromeURLDataManager::DataSource {
// the path we registered.
virtual void StartDataRequest(const std::string& path, int request_id);
+ virtual std::string GetMimeType(const std::string&) const {
+ return "text/html";
+ }
+
// Setters and getters for first_view.
static void set_first_view(bool first_view) { first_view_ = first_view; }
static bool first_view() { return first_view_; }
@@ -57,6 +61,10 @@ class IncognitoTabHTMLSource : public ChromeURLDataManager::DataSource {
// the path we registered.
virtual void StartDataRequest(const std::string& path, int request_id);
+ virtual std::string GetMimeType(const std::string&) const {
+ return "text/html";
+ }
+
private:
DISALLOW_EVIL_CONSTRUCTORS(IncognitoTabHTMLSource);
};
@@ -71,6 +79,11 @@ class ThumbnailSource : public ChromeURLDataManager::DataSource {
// the path we registered.
virtual void StartDataRequest(const std::string& path, int request_id);
+ virtual std::string GetMimeType(const std::string&) const {
+ // Rely on image decoder inferring the correct type.
+ return std::string();
+ }
+
// Called when thumbnail data is available from the history backend.
void OnThumbnailDataAvailable(
HistoryService::Handle request_handle,
@@ -97,6 +110,11 @@ class FavIconSource : public ChromeURLDataManager::DataSource {
// the path we registered.
virtual void StartDataRequest(const std::string& path, int request_id);
+ virtual std::string GetMimeType(const std::string&) const {
+ // Rely on image decoder inferring the correct type.
+ return std::string();
+ }
+
// Called when favicon data is available from the history backend.
void OnFavIconDataAvailable(
HistoryService::Handle request_handle,