diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-12 23:08:30 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-12 23:08:30 +0000 |
commit | e38f40150dac6e0af08e3cdcfb1e502a2223c87c (patch) | |
tree | 3b31c4c506ac390d712921ae35acad89f7afd5d7 /chrome/browser/views | |
parent | 5baa03fdfe3a13d4102a819fb3e653f1559b5259 (diff) | |
download | chromium_src-e38f40150dac6e0af08e3cdcfb1e502a2223c87c.zip chromium_src-e38f40150dac6e0af08e3cdcfb1e502a2223c87c.tar.gz chromium_src-e38f40150dac6e0af08e3cdcfb1e502a2223c87c.tar.bz2 |
Revert the change that fixed the encoding when viewing source in subframes.
This makes view source for some pages (for example Google Reader) not work
properly. I speculate that telling WebKit to change the encoding (which causes
a reload) right after starting the real load makes it confused.
Review URL: http://codereview.chromium.org/3022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/constrained_window_impl.cc | 10 | ||||
-rw-r--r-- | chrome/browser/views/constrained_window_impl.h | 3 | ||||
-rw-r--r-- | chrome/browser/views/html_dialog_view.cc | 6 | ||||
-rw-r--r-- | chrome/browser/views/html_dialog_view.h | 3 | ||||
-rw-r--r-- | chrome/browser/views/options/fonts_page_view.cc | 6 | ||||
-rw-r--r-- | chrome/browser/views/tabs/dragged_tab_controller.cc | 13 | ||||
-rw-r--r-- | chrome/browser/views/tabs/dragged_tab_controller.h | 3 |
7 files changed, 16 insertions, 28 deletions
diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc index 77b1854..de02b41 100644 --- a/chrome/browser/views/constrained_window_impl.cc +++ b/chrome/browser/views/constrained_window_impl.cc @@ -985,12 +985,10 @@ void ConstrainedWindowImpl::ActivateContents(TabContents* contents) { ActivateConstrainedWindow(); } -void ConstrainedWindowImpl::OpenURLFromTab( - TabContents* source, - const GURL& url, - WindowOpenDisposition disposition, - PageTransition::Type transition, - const std::string& override_encoding) { +void ConstrainedWindowImpl::OpenURLFromTab(TabContents* source, + const GURL& url, + WindowOpenDisposition disposition, + PageTransition::Type transition) { // We ignore source right now. owner_->OpenURL(this, url, disposition, transition); } diff --git a/chrome/browser/views/constrained_window_impl.h b/chrome/browser/views/constrained_window_impl.h index 64456ae..90c2db3 100644 --- a/chrome/browser/views/constrained_window_impl.h +++ b/chrome/browser/views/constrained_window_impl.h @@ -55,8 +55,7 @@ class ConstrainedWindowImpl : public ConstrainedWindow, virtual void OpenURLFromTab(TabContents* source, const GURL& url, WindowOpenDisposition disposition, - PageTransition::Type transition, - const std::string& override_encoding); + PageTransition::Type transition); // Overridden from TabContentsDelegate: virtual void NavigationStateChanged(const TabContents* source, diff --git a/chrome/browser/views/html_dialog_view.cc b/chrome/browser/views/html_dialog_view.cc index 6b413d3..1d985d2 100644 --- a/chrome/browser/views/html_dialog_view.cc +++ b/chrome/browser/views/html_dialog_view.cc @@ -85,13 +85,11 @@ void HtmlDialogView::OnDialogClosed(const std::string& json_retval) { void HtmlDialogView::OpenURLFromTab(TabContents* source, const GURL& url, WindowOpenDisposition disposition, - PageTransition::Type transition, - const std::string& override_encoding) { + PageTransition::Type transition) { // Force all links to open in a new window, ignoring the incoming // disposition. This is a tabless, modal dialog so we can't just // open it in the current frame. - parent_browser_->OpenURLFromTab(source, url, NEW_WINDOW, transition, - override_encoding); + parent_browser_->OpenURLFromTab(source, url, NEW_WINDOW, transition); } //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/views/html_dialog_view.h b/chrome/browser/views/html_dialog_view.h index 0c4dc59..82a42f6 100644 --- a/chrome/browser/views/html_dialog_view.h +++ b/chrome/browser/views/html_dialog_view.h @@ -57,8 +57,7 @@ class HtmlDialogView virtual void OpenURLFromTab(TabContents* source, const GURL& url, WindowOpenDisposition disposition, - PageTransition::Type transition, - const std::string& override_encoding); + PageTransition::Type transition); virtual void NavigationStateChanged(const TabContents* source, unsigned changed_flags); virtual void ReplaceContents(TabContents* source, diff --git a/chrome/browser/views/options/fonts_page_view.cc b/chrome/browser/views/options/fonts_page_view.cc index 797dc35..09a82cf 100644 --- a/chrome/browser/views/options/fonts_page_view.cc +++ b/chrome/browser/views/options/fonts_page_view.cc @@ -55,8 +55,7 @@ class DefaultEncodingComboboxModel : public ChromeViews::ComboBox::Model { std::wstring GetEncodingCharsetByIndex(int index) { DCHECK(index >= 0 && canonical_encoding_names_length_ > index); - return UTF8ToWide( - CharacterEncoding::GetCanonicalEncodingNameByIndex(index)); + return CharacterEncoding::GetCanonicalEncodingNameByIndex(index); } int GetSelectedEncodingIndex(Profile* profile) { @@ -64,8 +63,7 @@ class DefaultEncodingComboboxModel : public ChromeViews::ComboBox::Model { current_encoding_string.Init(prefs::kDefaultCharset, profile->GetPrefs(), NULL); - const std::string current_encoding = - WideToUTF8(current_encoding_string.GetValue()); + const std::wstring current_encoding = current_encoding_string.GetValue(); for (int i = 0; i < canonical_encoding_names_length_; i++) { if (CharacterEncoding::GetCanonicalEncodingNameByIndex(i) == current_encoding) diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc index 81b5386..82c002e 100644 --- a/chrome/browser/views/tabs/dragged_tab_controller.cc +++ b/chrome/browser/views/tabs/dragged_tab_controller.cc @@ -141,18 +141,15 @@ bool DraggedTabController::IsDragSourceTab(Tab* tab) const { /////////////////////////////////////////////////////////////////////////////// // DraggedTabController, PageNavigator implementation: -void DraggedTabController::OpenURLFromTab( - TabContents* source, - const GURL& url, - WindowOpenDisposition disposition, - PageTransition::Type transition, - const std::string& override_encoding) { +void DraggedTabController::OpenURLFromTab(TabContents* source, + const GURL& url, + WindowOpenDisposition disposition, + PageTransition::Type transition) { if (original_delegate_) { if (disposition == CURRENT_TAB) disposition = NEW_WINDOW; - original_delegate_->OpenURLFromTab(source, url, disposition, transition, - override_encoding); + original_delegate_->OpenURLFromTab(source, url, disposition, transition); } } diff --git a/chrome/browser/views/tabs/dragged_tab_controller.h b/chrome/browser/views/tabs/dragged_tab_controller.h index 6c6aed6..5874661 100644 --- a/chrome/browser/views/tabs/dragged_tab_controller.h +++ b/chrome/browser/views/tabs/dragged_tab_controller.h @@ -81,8 +81,7 @@ class DraggedTabController : public TabContentsDelegate, virtual void OpenURLFromTab(TabContents* source, const GURL& url, WindowOpenDisposition disposition, - PageTransition::Type transition, - const std::string& override_encoding); + PageTransition::Type transition); virtual void NavigationStateChanged(const TabContents* source, unsigned changed_flags); virtual void ReplaceContents(TabContents* source, |