diff options
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/webui/chrome_web_ui_factory.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/webui/quota_internals_ui.cc | 50 | ||||
-rw-r--r-- | chrome/browser/ui/webui/quota_internals_ui.h | 42 |
3 files changed, 0 insertions, 95 deletions
diff --git a/chrome/browser/ui/webui/chrome_web_ui_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_factory.cc index 2e2ecd1..0848820 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_factory.cc @@ -30,7 +30,6 @@ #include "chrome/browser/ui/webui/options/options_ui.h" #include "chrome/browser/ui/webui/plugins_ui.h" #include "chrome/browser/ui/webui/print_preview_ui.h" -#include "chrome/browser/ui/webui/quota_internals_ui.h" #include "chrome/browser/ui/webui/sessions_ui.h" #include "chrome/browser/ui/webui/sync_internals_ui.h" #include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h" @@ -180,8 +179,6 @@ static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile, return &NewWebUI<SyncInternalsUI>; if (url.host() == chrome::kChromeUISettingsHost) return &NewWebUI<OptionsUI>; - if (url.host() == chrome::kChromeUIQuotaInternalsHost) - return &NewWebUI<QuotaInternalsUI>; #if defined(OS_CHROMEOS) if (url.host() == chrome::kChromeUIChooseMobileNetworkHost) diff --git a/chrome/browser/ui/webui/quota_internals_ui.cc b/chrome/browser/ui/webui/quota_internals_ui.cc deleted file mode 100644 index fd02d4d..0000000 --- a/chrome/browser/ui/webui/quota_internals_ui.cc +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ui/webui/quota_internals_ui.h" - -#include <algorithm> -#include <string> - -#include "chrome/browser/profiles/profile.h" -#include "chrome/common/url_constants.h" -#include "content/browser/tab_contents/tab_contents.h" -#include "content/common/json_value_serializer.h" -#include "grit/quota_internals_resources.h" -#include "ui/base/l10n/l10n_util.h" -#include "ui/base/resource/resource_bundle.h" - -QuotaInternalsUI::QuotaInternalsUI(TabContents* contents) - : ChromeWebUI(contents) { - // TODO(tzik): implement and attach message handler - contents->profile()->GetChromeURLDataManager()-> - AddDataSource(new quota_internals::QuotaInternalsHTMLSource); -} - -namespace quota_internals { - -const char QuotaInternalsHTMLSource::kStringsJSPath[] = "strings.js"; - -QuotaInternalsHTMLSource::QuotaInternalsHTMLSource() - : ChromeWebUIDataSource(chrome::kChromeUIQuotaInternalsHost) { -} - -void QuotaInternalsHTMLSource::StartDataRequest(const std::string& path, - bool is_incognito, - int request_id) OVERRIDE { - if (path == kStringsJSPath) - SendLocalizedStringsAsJSON(request_id); - else - SendFromResourceBundle(request_id, IDR_QUOTA_INTERNALS_MAIN_HTML); -} - -std::string QuotaInternalsHTMLSource::GetMimeType( - const std::string& path) const { - if (path == kStringsJSPath) - return "application/javascript"; - else - return "text/html"; -} - -} // namespace quota_internals diff --git a/chrome/browser/ui/webui/quota_internals_ui.h b/chrome/browser/ui/webui/quota_internals_ui.h deleted file mode 100644 index d954fdb..0000000 --- a/chrome/browser/ui/webui/quota_internals_ui.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_UI_H_ -#define CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_UI_H_ -#pragma once - -#include <string> - -#include "chrome/browser/ui/webui/chrome_web_ui.h" -#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" - -class QuotaInternalsUI : public ChromeWebUI { - public: - explicit QuotaInternalsUI(TabContents* contents); - virtual ~QuotaInternalsUI() {} - private: - DISALLOW_COPY_AND_ASSIGN(QuotaInternalsUI); -}; - -namespace quota_internals { - -class QuotaInternalsHTMLSource : public ChromeWebUIDataSource { - public: - static const char kStringsJSPath[]; - - QuotaInternalsHTMLSource(); - virtual void StartDataRequest(const std::string& path, - bool is_incognito, - int request_id) OVERRIDE; - virtual std::string GetMimeType(const std::string& path) const; - - private: - virtual ~QuotaInternalsHTMLSource() {} - - DISALLOW_COPY_AND_ASSIGN(QuotaInternalsHTMLSource); -}; - -} // namespace quota_internals - -#endif // CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_UI_H_ |