summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/tab_contents_delegate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents_delegate.cc')
-rw-r--r--chrome/browser/tab_contents/tab_contents_delegate.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_delegate.cc b/chrome/browser/tab_contents/tab_contents_delegate.cc
index 21c13ff..987e620 100644
--- a/chrome/browser/tab_contents/tab_contents_delegate.cc
+++ b/chrome/browser/tab_contents/tab_contents_delegate.cc
@@ -5,12 +5,16 @@
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
#include "chrome/browser/search_engines/template_url.h"
+#include "chrome/common/url_constants.h"
#include "gfx/rect.h"
std::string TabContentsDelegate::GetNavigationHeaders(const GURL& url) {
return std::string();
}
+void TabContentsDelegate::LoadProgressChanged(double progress) {
+}
+
void TabContentsDelegate::DetachContents(TabContents* source) {
}
@@ -131,6 +135,20 @@ void TabContentsDelegate::ShowPageInfo(Profile* profile,
bool show_history) {
}
+void TabContentsDelegate::ViewSourceForTab(TabContents* source,
+ const GURL& page_url) {
+ // Fall back implementation based entirely on the view-source scheme.
+ // It suffers from http://crbug.com/523 and that is why browser overrides
+ // it with proper implementation.
+ GURL url = GURL(chrome::kViewSourceScheme + std::string(":") +
+ page_url.spec());
+ OpenURLFromTab(source,
+ url,
+ GURL(),
+ NEW_FOREGROUND_TAB,
+ PageTransition::LINK);
+}
+
bool TabContentsDelegate::PreHandleKeyboardEvent(
const NativeWebKeyboardEvent& event,
bool* is_keyboard_shortcut) {