summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 00:44:39 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 00:44:39 +0000
commite4be2dd25b1883bad7bed358e52e04f01c6e6f78 (patch)
tree842b39b7ea3547a97e07e2d4dcbb4795020c435c /chrome/browser/dom_ui
parent6415176be8ad6b36d4adafa1c8e76aa89c5ca17c (diff)
downloadchromium_src-e4be2dd25b1883bad7bed358e52e04f01c6e6f78.zip
chromium_src-e4be2dd25b1883bad7bed358e52e04f01c6e6f78.tar.gz
chromium_src-e4be2dd25b1883bad7bed358e52e04f01c6e6f78.tar.bz2
Deinline even more destructors.
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5794003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69084 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/dom_ui_screenshot_source.cc6
-rw-r--r--chrome/browser/dom_ui/dom_ui_screenshot_source.h6
-rw-r--r--chrome/browser/dom_ui/fileicon_source.cc5
-rw-r--r--chrome/browser/dom_ui/fileicon_source.h5
-rw-r--r--chrome/browser/dom_ui/history2_ui.cc4
-rw-r--r--chrome/browser/dom_ui/history2_ui.h4
-rw-r--r--chrome/browser/dom_ui/options/options_ui.cc4
-rw-r--r--chrome/browser/dom_ui/options/options_ui.h2
8 files changed, 23 insertions, 13 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_screenshot_source.cc b/chrome/browser/dom_ui/dom_ui_screenshot_source.cc
index db35499..110a52e 100644
--- a/chrome/browser/dom_ui/dom_ui_screenshot_source.cc
+++ b/chrome/browser/dom_ui/dom_ui_screenshot_source.cc
@@ -115,3 +115,9 @@ void DOMUIScreenshotSource::StartDataRequest(const std::string& path,
int request_id) {
SendResponse(request_id, new RefCountedBytes(GetScreenshot(path)));
}
+
+std::string DOMUIScreenshotSource::GetMimeType(const std::string&) const {
+ // We need to explicitly return a mime type, otherwise if the user tries to
+ // drag the image they get no extension.
+ return "image/png";
+}
diff --git a/chrome/browser/dom_ui/dom_ui_screenshot_source.h b/chrome/browser/dom_ui/dom_ui_screenshot_source.h
index 8cd8b2c..3a9aafc 100644
--- a/chrome/browser/dom_ui/dom_ui_screenshot_source.h
+++ b/chrome/browser/dom_ui/dom_ui_screenshot_source.h
@@ -27,11 +27,7 @@ class DOMUIScreenshotSource : public ChromeURLDataManager::DataSource {
bool is_off_the_record,
int request_id);
- virtual std::string GetMimeType(const std::string&) const {
- // We need to explicitly return a mime type, otherwise if the user tries to
- // drag the image they get no extension.
- return "image/png";
- }
+ virtual std::string GetMimeType(const std::string&) const;
std::vector<unsigned char> GetScreenshot(const std::string& path);
diff --git a/chrome/browser/dom_ui/fileicon_source.cc b/chrome/browser/dom_ui/fileicon_source.cc
index 7572cdc..a720df8 100644
--- a/chrome/browser/dom_ui/fileicon_source.cc
+++ b/chrome/browser/dom_ui/fileicon_source.cc
@@ -59,6 +59,11 @@ void FileIconSource::StartDataRequest(const std::string& path,
}
}
+std::string FileIconSource::GetMimeType(const std::string&) const {
+ // Rely on image decoder inferring the correct type.
+ return std::string();
+}
+
void FileIconSource::OnFileIconDataAvailable(IconManager::Handle handle,
SkBitmap* icon) {
IconManager* im = g_browser_process->icon_manager();
diff --git a/chrome/browser/dom_ui/fileicon_source.h b/chrome/browser/dom_ui/fileicon_source.h
index b8e1d2f..1bcf060 100644
--- a/chrome/browser/dom_ui/fileicon_source.h
+++ b/chrome/browser/dom_ui/fileicon_source.h
@@ -26,10 +26,7 @@ class FileIconSource : public ChromeURLDataManager::DataSource {
bool is_off_the_record,
int request_id);
- virtual std::string GetMimeType(const std::string&) const {
- // Rely on image decoder inferring the correct type.
- return std::string();
- }
+ virtual std::string GetMimeType(const std::string&) const;
// Called when favicon data is available from the history backend.
void OnFileIconDataAvailable(
diff --git a/chrome/browser/dom_ui/history2_ui.cc b/chrome/browser/dom_ui/history2_ui.cc
index 3e9f67e..4001bb1 100644
--- a/chrome/browser/dom_ui/history2_ui.cc
+++ b/chrome/browser/dom_ui/history2_ui.cc
@@ -107,6 +107,10 @@ void HistoryUIHTMLSource2::StartDataRequest(const std::string& path,
SendResponse(request_id, html_bytes);
}
+std::string HistoryUIHTMLSource2::GetMimeType(const std::string&) const {
+ return "text/html";
+}
+
////////////////////////////////////////////////////////////////////////////////
//
// HistoryHandler
diff --git a/chrome/browser/dom_ui/history2_ui.h b/chrome/browser/dom_ui/history2_ui.h
index b38650e..a9e1d26 100644
--- a/chrome/browser/dom_ui/history2_ui.h
+++ b/chrome/browser/dom_ui/history2_ui.h
@@ -30,9 +30,7 @@ class HistoryUIHTMLSource2 : public ChromeURLDataManager::DataSource {
bool is_off_the_record,
int request_id);
- virtual std::string GetMimeType(const std::string&) const {
- return "text/html";
- }
+ virtual std::string GetMimeType(const std::string&) const;
private:
~HistoryUIHTMLSource2() {}
diff --git a/chrome/browser/dom_ui/options/options_ui.cc b/chrome/browser/dom_ui/options/options_ui.cc
index ecf04b97..743f652 100644
--- a/chrome/browser/dom_ui/options/options_ui.cc
+++ b/chrome/browser/dom_ui/options/options_ui.cc
@@ -122,6 +122,10 @@ OptionsPageUIHandler::OptionsPageUIHandler() {
OptionsPageUIHandler::~OptionsPageUIHandler() {
}
+bool OptionsPageUIHandler::IsEnabled() {
+ return true;
+}
+
void OptionsPageUIHandler::UserMetricsRecordAction(
const UserMetricsAction& action) {
UserMetrics::RecordAction(action, dom_ui_->GetProfile());
diff --git a/chrome/browser/dom_ui/options/options_ui.h b/chrome/browser/dom_ui/options/options_ui.h
index 9d412a3..ad1007d 100644
--- a/chrome/browser/dom_ui/options/options_ui.h
+++ b/chrome/browser/dom_ui/options/options_ui.h
@@ -47,7 +47,7 @@ class OptionsPageUIHandler : public DOMMessageHandler,
virtual ~OptionsPageUIHandler();
// Is this handler enabled?
- virtual bool IsEnabled() { return true; }
+ virtual bool IsEnabled();
// Collects localized strings for options page.
virtual void GetLocalizedValues(DictionaryValue* localized_strings) = 0;