OLD | NEW |
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 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1756 const std::string& source_lang, | 1756 const std::string& source_lang, |
1757 const std::string& target_lang) { | 1757 const std::string& target_lang) { |
1758 Send(new ViewMsg_TranslatePage(routing_id(), page_id, | 1758 Send(new ViewMsg_TranslatePage(routing_id(), page_id, |
1759 source_lang, target_lang)); | 1759 source_lang, target_lang)); |
1760 } | 1760 } |
1761 | 1761 |
1762 void RenderViewHost::UndoTranslatePage(int page_id) { | 1762 void RenderViewHost::UndoTranslatePage(int page_id) { |
1763 Send(new ViewMsg_UndoTranslate(routing_id(), page_id)); | 1763 Send(new ViewMsg_UndoTranslate(routing_id(), page_id)); |
1764 } | 1764 } |
1765 | 1765 |
| 1766 void RenderViewHost::SendContentSettings(const std::string& host, |
| 1767 const ContentSettings& settings) { |
| 1768 Send(new ViewMsg_SetContentSettingsForCurrentHost(host, settings)); |
| 1769 } |
| 1770 |
1766 void RenderViewHost::OnExtensionPostMessage( | 1771 void RenderViewHost::OnExtensionPostMessage( |
1767 int port_id, const std::string& message) { | 1772 int port_id, const std::string& message) { |
1768 if (process()->profile()->GetExtensionMessageService()) { | 1773 if (process()->profile()->GetExtensionMessageService()) { |
1769 process()->profile()->GetExtensionMessageService()-> | 1774 process()->profile()->GetExtensionMessageService()-> |
1770 PostMessageFromRenderer(port_id, message); | 1775 PostMessageFromRenderer(port_id, message); |
1771 } | 1776 } |
1772 } | 1777 } |
1773 | 1778 |
1774 void RenderViewHost::OnAccessibilityFocusChange(int acc_obj_id) { | 1779 void RenderViewHost::OnAccessibilityFocusChange(int acc_obj_id) { |
1775 #if defined(OS_WIN) | 1780 #if defined(OS_WIN) |
(...skipping 23 matching lines...) Expand all Loading... |
1799 void RenderViewHost::OnPageTranslated(int32 page_id, | 1804 void RenderViewHost::OnPageTranslated(int32 page_id, |
1800 const std::string& original_lang, | 1805 const std::string& original_lang, |
1801 const std::string& translated_lang) { | 1806 const std::string& translated_lang) { |
1802 RenderViewHostDelegate::BrowserIntegration* integration_delegate = | 1807 RenderViewHostDelegate::BrowserIntegration* integration_delegate = |
1803 delegate_->GetBrowserIntegrationDelegate(); | 1808 delegate_->GetBrowserIntegrationDelegate(); |
1804 if (!integration_delegate) | 1809 if (!integration_delegate) |
1805 return; | 1810 return; |
1806 integration_delegate->OnPageTranslated(page_id, | 1811 integration_delegate->OnPageTranslated(page_id, |
1807 original_lang, translated_lang); | 1812 original_lang, translated_lang); |
1808 } | 1813 } |
OLD | NEW |