Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 2714012: Convert page contents grabbing from wide to UTF16. The current code is a bit... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_host/render_view_host.h" 5 #include "chrome/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 Source<RenderViewHost>(this), 1861 Source<RenderViewHost>(this),
1862 NotificationService::NoDetails()); 1862 NotificationService::NoDetails());
1863 } 1863 }
1864 1864
1865 void RenderViewHost::OnCSSInserted() { 1865 void RenderViewHost::OnCSSInserted() {
1866 delegate_->DidInsertCSS(); 1866 delegate_->DidInsertCSS();
1867 } 1867 }
1868 1868
1869 void RenderViewHost::OnPageContents(const GURL& url, 1869 void RenderViewHost::OnPageContents(const GURL& url,
1870 int32 page_id, 1870 int32 page_id,
1871 const std::wstring& contents, 1871 const string16& contents,
1872 const std::string& language) { 1872 const std::string& language) {
1873 RenderViewHostDelegate::BrowserIntegration* integration_delegate = 1873 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1874 delegate_->GetBrowserIntegrationDelegate(); 1874 delegate_->GetBrowserIntegrationDelegate();
1875 if (!integration_delegate) 1875 if (!integration_delegate)
1876 return; 1876 return;
1877 integration_delegate->OnPageContents(url, process()->id(), page_id, contents, 1877 integration_delegate->OnPageContents(url, process()->id(), page_id, contents,
1878 language); 1878 language);
1879 } 1879 }
1880 1880
1881 void RenderViewHost::OnPageTranslated(int32 page_id, 1881 void RenderViewHost::OnPageTranslated(int32 page_id,
1882 const std::string& original_lang, 1882 const std::string& original_lang,
1883 const std::string& translated_lang, 1883 const std::string& translated_lang,
1884 TranslateErrors::Type error_type) { 1884 TranslateErrors::Type error_type) {
1885 RenderViewHostDelegate::BrowserIntegration* integration_delegate = 1885 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1886 delegate_->GetBrowserIntegrationDelegate(); 1886 delegate_->GetBrowserIntegrationDelegate();
1887 if (!integration_delegate) 1887 if (!integration_delegate)
1888 return; 1888 return;
1889 integration_delegate->OnPageTranslated(page_id, original_lang, 1889 integration_delegate->OnPageTranslated(page_id, original_lang,
1890 translated_lang, error_type); 1890 translated_lang, error_type);
1891 } 1891 }
1892 1892
1893 void RenderViewHost::OnContentBlocked(ContentSettingsType type) { 1893 void RenderViewHost::OnContentBlocked(ContentSettingsType type) {
1894 RenderViewHostDelegate::Resource* resource_delegate = 1894 RenderViewHostDelegate::Resource* resource_delegate =
1895 delegate_->GetResourceDelegate(); 1895 delegate_->GetResourceDelegate();
1896 if (resource_delegate) 1896 if (resource_delegate)
1897 resource_delegate->OnContentBlocked(type); 1897 resource_delegate->OnContentBlocked(type);
1898 } 1898 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698