OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
801 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionPostMessage, | 801 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionPostMessage, |
802 OnExtensionPostMessage) | 802 OnExtensionPostMessage) |
803 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityNotifications, | 803 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityNotifications, |
804 OnAccessibilityNotifications) | 804 OnAccessibilityNotifications) |
805 IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted) | 805 IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted) |
806 IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked) | 806 IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked) |
807 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) | 807 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) |
808 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed) | 808 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed) |
809 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) | 809 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) |
810 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) | 810 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) |
811 IPC_MESSAGE_HANDLER(ViewHostMsg_DetectedPhishingSite, | |
812 OnDetectedPhishingSite) | |
813 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) | 811 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) |
814 #if defined(OS_MACOSX) | 812 #if defined(OS_MACOSX) |
815 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) | 813 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) |
816 #endif | 814 #endif |
817 IPC_MESSAGE_HANDLER(ViewHostMsg_CommandStateChanged, | 815 IPC_MESSAGE_HANDLER(ViewHostMsg_CommandStateChanged, |
818 OnCommandStateChanged) | 816 OnCommandStateChanged) |
819 // Have the super handle all other messages. | 817 // Have the super handle all other messages. |
820 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) | 818 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) |
821 IPC_END_MESSAGE_MAP_EX() | 819 IPC_END_MESSAGE_MAP_EX() |
822 | 820 |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1662 content_settings_delegate->OnWebDatabaseAccessed( | 1660 content_settings_delegate->OnWebDatabaseAccessed( |
1663 url, name, display_name, estimated_size, blocked_by_policy); | 1661 url, name, display_name, estimated_size, blocked_by_policy); |
1664 } | 1662 } |
1665 | 1663 |
1666 void RenderViewHost::OnUpdateZoomLimits(int minimum_percent, | 1664 void RenderViewHost::OnUpdateZoomLimits(int minimum_percent, |
1667 int maximum_percent, | 1665 int maximum_percent, |
1668 bool remember) { | 1666 bool remember) { |
1669 delegate_->UpdateZoomLimits(minimum_percent, maximum_percent, remember); | 1667 delegate_->UpdateZoomLimits(minimum_percent, maximum_percent, remember); |
1670 } | 1668 } |
1671 | 1669 |
1672 void RenderViewHost::OnDetectedPhishingSite(const GURL& phishing_url, | |
Brian Ryner
2011/02/11 01:30:39
Also remove the declaration of this method in rend
noelutz
2011/02/15 23:00:55
Done.
| |
1673 double phishing_score) { | |
1674 // TODO(noelutz): send an HTTP request to the client-side detection frontends | |
1675 // to confirm that the URL is really phishing. | |
1676 } | |
1677 | |
1678 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { | 1670 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { |
1679 Value* result_value; | 1671 Value* result_value; |
1680 result.Get(0, &result_value); | 1672 result.Get(0, &result_value); |
1681 std::pair<int, Value*> details(id, result_value); | 1673 std::pair<int, Value*> details(id, result_value); |
1682 NotificationService::current()->Notify( | 1674 NotificationService::current()->Notify( |
1683 NotificationType::EXECUTE_JAVASCRIPT_RESULT, | 1675 NotificationType::EXECUTE_JAVASCRIPT_RESULT, |
1684 Source<RenderViewHost>(this), | 1676 Source<RenderViewHost>(this), |
1685 Details<std::pair<int, Value*> >(&details)); | 1677 Details<std::pair<int, Value*> >(&details)); |
1686 } | 1678 } |
1687 | 1679 |
(...skipping 26 matching lines...) Expand all Loading... | |
1714 LOG(DFATAL) << "Invalid checked state " << checked_state; | 1706 LOG(DFATAL) << "Invalid checked state " << checked_state; |
1715 return; | 1707 return; |
1716 } | 1708 } |
1717 | 1709 |
1718 CommandState state; | 1710 CommandState state; |
1719 state.is_enabled = is_enabled; | 1711 state.is_enabled = is_enabled; |
1720 state.checked_state = | 1712 state.checked_state = |
1721 static_cast<RenderViewCommandCheckedState>(checked_state); | 1713 static_cast<RenderViewCommandCheckedState>(checked_state); |
1722 command_states_[static_cast<RenderViewCommand>(command)] = state; | 1714 command_states_[static_cast<RenderViewCommand>(command)] = state; |
1723 } | 1715 } |
OLD | NEW |