| 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 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionPostMessage, | 828 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionPostMessage, |
| 829 OnExtensionPostMessage) | 829 OnExtensionPostMessage) |
| 830 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityFocusChange, | 830 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityFocusChange, |
| 831 OnAccessibilityFocusChange) | 831 OnAccessibilityFocusChange) |
| 832 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityObjectStateChange, | 832 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityObjectStateChange, |
| 833 OnAccessibilityObjectStateChange) | 833 OnAccessibilityObjectStateChange) |
| 834 IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted) | 834 IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted) |
| 835 IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageContents) | 835 IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageContents) |
| 836 IPC_MESSAGE_HANDLER(ViewHostMsg_PageTranslated, OnPageTranslated) | 836 IPC_MESSAGE_HANDLER(ViewHostMsg_PageTranslated, OnPageTranslated) |
| 837 IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked) | 837 IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked) |
| 838 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed) |
| 838 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityTree, OnAccessibilityTree) | 839 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityTree, OnAccessibilityTree) |
| 839 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) | 840 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) |
| 840 // Have the super handle all other messages. | 841 // Have the super handle all other messages. |
| 841 IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg)) | 842 IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg)) |
| 842 IPC_END_MESSAGE_MAP_EX() | 843 IPC_END_MESSAGE_MAP_EX() |
| 843 | 844 |
| 844 if (!msg_is_ok) { | 845 if (!msg_is_ok) { |
| 845 // The message had a handler, but its de-serialization failed. | 846 // The message had a handler, but its de-serialization failed. |
| 846 // Kill the renderer. | 847 // Kill the renderer. |
| 847 process()->ReceivedBadMessage(msg.type()); | 848 process()->ReceivedBadMessage(msg.type()); |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1900 integration_delegate->OnPageTranslated(page_id, original_lang, | 1901 integration_delegate->OnPageTranslated(page_id, original_lang, |
| 1901 translated_lang, error_type); | 1902 translated_lang, error_type); |
| 1902 } | 1903 } |
| 1903 | 1904 |
| 1904 void RenderViewHost::OnContentBlocked(ContentSettingsType type) { | 1905 void RenderViewHost::OnContentBlocked(ContentSettingsType type) { |
| 1905 RenderViewHostDelegate::ContentSettings* content_settings_delegate = | 1906 RenderViewHostDelegate::ContentSettings* content_settings_delegate = |
| 1906 delegate_->GetContentSettingsDelegate(); | 1907 delegate_->GetContentSettingsDelegate(); |
| 1907 if (content_settings_delegate) | 1908 if (content_settings_delegate) |
| 1908 content_settings_delegate->OnContentBlocked(type); | 1909 content_settings_delegate->OnContentBlocked(type); |
| 1909 } | 1910 } |
| 1911 |
| 1912 void RenderViewHost::OnWebDatabaseAccessed(const GURL& url, |
| 1913 const string16& name, |
| 1914 const string16& display_name, |
| 1915 unsigned long estimated_size, |
| 1916 bool blocked_by_policy) { |
| 1917 RenderViewHostDelegate::ContentSettings* content_settings_delegate = |
| 1918 delegate_->GetContentSettingsDelegate(); |
| 1919 if (content_settings_delegate) |
| 1920 content_settings_delegate->OnWebDatabaseAccessed( |
| 1921 url, name, display_name, estimated_size, blocked_by_policy); |
| 1922 } |
| OLD | NEW |