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

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

Issue 6014003: Intergration of the client-side phishing detection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 9 years, 10 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) 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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionPostMessage, 800 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionPostMessage,
801 OnExtensionPostMessage) 801 OnExtensionPostMessage)
802 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityNotifications, 802 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityNotifications,
803 OnAccessibilityNotifications) 803 OnAccessibilityNotifications)
804 IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted) 804 IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted)
805 IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked) 805 IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked)
806 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) 806 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
807 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed) 807 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed)
808 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) 808 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged)
809 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) 809 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits)
810 IPC_MESSAGE_HANDLER(ViewHostMsg_DetectedPhishingSite,
811 OnDetectedPhishingSite)
812 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) 810 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse)
813 #if defined(OS_MACOSX) 811 #if defined(OS_MACOSX)
814 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) 812 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup)
815 #endif 813 #endif
816 IPC_MESSAGE_HANDLER(ViewHostMsg_CommandStateChanged, 814 IPC_MESSAGE_HANDLER(ViewHostMsg_CommandStateChanged,
817 OnCommandStateChanged) 815 OnCommandStateChanged)
818 // Have the super handle all other messages. 816 // Have the super handle all other messages.
819 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) 817 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg))
820 IPC_END_MESSAGE_MAP_EX() 818 IPC_END_MESSAGE_MAP_EX()
821 819
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 content_settings_delegate->OnWebDatabaseAccessed( 1655 content_settings_delegate->OnWebDatabaseAccessed(
1658 url, name, display_name, estimated_size, blocked_by_policy); 1656 url, name, display_name, estimated_size, blocked_by_policy);
1659 } 1657 }
1660 1658
1661 void RenderViewHost::OnUpdateZoomLimits(int minimum_percent, 1659 void RenderViewHost::OnUpdateZoomLimits(int minimum_percent,
1662 int maximum_percent, 1660 int maximum_percent,
1663 bool remember) { 1661 bool remember) {
1664 delegate_->UpdateZoomLimits(minimum_percent, maximum_percent, remember); 1662 delegate_->UpdateZoomLimits(minimum_percent, maximum_percent, remember);
1665 } 1663 }
1666 1664
1667 void RenderViewHost::OnDetectedPhishingSite(const GURL& phishing_url,
1668 double phishing_score) {
1669 // TODO(noelutz): send an HTTP request to the client-side detection frontends
1670 // to confirm that the URL is really phishing.
1671 }
1672
1673 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { 1665 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) {
1674 Value* result_value; 1666 Value* result_value;
1675 result.Get(0, &result_value); 1667 result.Get(0, &result_value);
1676 std::pair<int, Value*> details(id, result_value); 1668 std::pair<int, Value*> details(id, result_value);
1677 NotificationService::current()->Notify( 1669 NotificationService::current()->Notify(
1678 NotificationType::EXECUTE_JAVASCRIPT_RESULT, 1670 NotificationType::EXECUTE_JAVASCRIPT_RESULT,
1679 Source<RenderViewHost>(this), 1671 Source<RenderViewHost>(this),
1680 Details<std::pair<int, Value*> >(&details)); 1672 Details<std::pair<int, Value*> >(&details));
1681 } 1673 }
1682 1674
(...skipping 26 matching lines...) Expand all
1709 LOG(DFATAL) << "Invalid checked state " << checked_state; 1701 LOG(DFATAL) << "Invalid checked state " << checked_state;
1710 return; 1702 return;
1711 } 1703 }
1712 1704
1713 CommandState state; 1705 CommandState state;
1714 state.is_enabled = is_enabled; 1706 state.is_enabled = is_enabled;
1715 state.checked_state = 1707 state.checked_state =
1716 static_cast<RenderViewCommandCheckedState>(checked_state); 1708 static_cast<RenderViewCommandCheckedState>(checked_state);
1717 command_states_[static_cast<RenderViewCommand>(command)] = state; 1709 command_states_[static_cast<RenderViewCommand>(command)] = state;
1718 } 1710 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/safe_browsing/client_side_detection_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698