| 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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) | 843 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) |
| 844 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed) | 844 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed) |
| 845 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) | 845 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) |
| 846 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) | 846 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) |
| 847 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSuggestions, OnSetSuggestions) | 847 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSuggestions, OnSetSuggestions) |
| 848 IPC_MESSAGE_HANDLER(ViewHostMsg_InstantSupportDetermined, | 848 IPC_MESSAGE_HANDLER(ViewHostMsg_InstantSupportDetermined, |
| 849 OnInstantSupportDetermined) | 849 OnInstantSupportDetermined) |
| 850 IPC_MESSAGE_HANDLER(ViewHostMsg_DetectedPhishingSite, | 850 IPC_MESSAGE_HANDLER(ViewHostMsg_DetectedPhishingSite, |
| 851 OnDetectedPhishingSite) | 851 OnDetectedPhishingSite) |
| 852 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) | 852 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) |
| 853 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateContentRestrictions, | |
| 854 OnUpdateContentRestrictions) | |
| 855 #if defined(OS_MACOSX) | 853 #if defined(OS_MACOSX) |
| 856 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) | 854 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) |
| 857 #endif | 855 #endif |
| 858 IPC_MESSAGE_HANDLER(ViewHostMsg_PagesReadyForPreview, | 856 IPC_MESSAGE_HANDLER(ViewHostMsg_PagesReadyForPreview, |
| 859 OnPagesReadyForPreview) | 857 OnPagesReadyForPreview) |
| 860 // Have the super handle all other messages. | 858 // Have the super handle all other messages. |
| 861 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) | 859 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) |
| 862 IPC_END_MESSAGE_MAP_EX() | 860 IPC_END_MESSAGE_MAP_EX() |
| 863 | 861 |
| 864 if (!msg_is_ok) { | 862 if (!msg_is_ok) { |
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1943 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { | 1941 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { |
| 1944 Value* result_value; | 1942 Value* result_value; |
| 1945 result.Get(0, &result_value); | 1943 result.Get(0, &result_value); |
| 1946 std::pair<int, Value*> details(id, result_value); | 1944 std::pair<int, Value*> details(id, result_value); |
| 1947 NotificationService::current()->Notify( | 1945 NotificationService::current()->Notify( |
| 1948 NotificationType::EXECUTE_JAVASCRIPT_RESULT, | 1946 NotificationType::EXECUTE_JAVASCRIPT_RESULT, |
| 1949 Source<RenderViewHost>(this), | 1947 Source<RenderViewHost>(this), |
| 1950 Details<std::pair<int, Value*> >(&details)); | 1948 Details<std::pair<int, Value*> >(&details)); |
| 1951 } | 1949 } |
| 1952 | 1950 |
| 1953 void RenderViewHost::OnUpdateContentRestrictions(int restrictions) { | |
| 1954 delegate_->UpdateContentRestrictions(restrictions); | |
| 1955 } | |
| 1956 | |
| 1957 #if defined(OS_MACOSX) | 1951 #if defined(OS_MACOSX) |
| 1958 void RenderViewHost::OnMsgShowPopup( | 1952 void RenderViewHost::OnMsgShowPopup( |
| 1959 const ViewHostMsg_ShowPopup_Params& params) { | 1953 const ViewHostMsg_ShowPopup_Params& params) { |
| 1960 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1954 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); |
| 1961 if (view) { | 1955 if (view) { |
| 1962 view->ShowPopupMenu(params.bounds, | 1956 view->ShowPopupMenu(params.bounds, |
| 1963 params.item_height, | 1957 params.item_height, |
| 1964 params.item_font_size, | 1958 params.item_font_size, |
| 1965 params.selected_item, | 1959 params.selected_item, |
| 1966 params.popup_items, | 1960 params.popup_items, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 if (printer_query.get()) { | 2004 if (printer_query.get()) { |
| 2011 BrowserThread::PostTask( | 2005 BrowserThread::PostTask( |
| 2012 BrowserThread::IO, FROM_HERE, | 2006 BrowserThread::IO, FROM_HERE, |
| 2013 NewRunnableMethod(printer_query.get(), | 2007 NewRunnableMethod(printer_query.get(), |
| 2014 &printing::PrinterQuery::StopWorker)); | 2008 &printing::PrinterQuery::StopWorker)); |
| 2015 } | 2009 } |
| 2016 | 2010 |
| 2017 // Send the printingDone msg for now. | 2011 // Send the printingDone msg for now. |
| 2018 Send(new ViewMsg_PrintingDone(routing_id(), params.document_cookie, true)); | 2012 Send(new ViewMsg_PrintingDone(routing_id(), params.document_cookie, true)); |
| 2019 } | 2013 } |
| OLD | NEW |