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

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

Issue 56122: Callbacks through ChromeClient->RenderView->RenderViewHost for ContentsDidCha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <vector> 8 #include <vector>
9 9
10 #include "base/gfx/native_widget_types.h" 10 #include "base/gfx/native_widget_types.h"
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 OnMsgDidRedirectProvisionalLoad) 705 OnMsgDidRedirectProvisionalLoad)
706 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartProvisionalLoadForFrame, 706 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartProvisionalLoadForFrame,
707 OnMsgDidStartProvisionalLoadForFrame) 707 OnMsgDidStartProvisionalLoadForFrame)
708 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFailProvisionalLoadWithError, 708 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFailProvisionalLoadWithError,
709 OnMsgDidFailProvisionalLoadWithError) 709 OnMsgDidFailProvisionalLoadWithError)
710 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnMsgFindReply) 710 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnMsgFindReply)
711 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFavIconURL, OnMsgUpdateFavIconURL) 711 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFavIconURL, OnMsgUpdateFavIconURL)
712 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDownloadImage, OnMsgDidDownloadImage) 712 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDownloadImage, OnMsgDidDownloadImage)
713 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) 713 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu)
714 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) 714 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL)
715 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredWidthChange,
716 OnMsgDidContentsPreferredWidthChange)
715 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, 717 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse,
716 OnMsgDomOperationResponse) 718 OnMsgDomOperationResponse)
717 IPC_MESSAGE_HANDLER(ViewHostMsg_DOMUISend, 719 IPC_MESSAGE_HANDLER(ViewHostMsg_DOMUISend,
718 OnMsgDOMUISend) 720 OnMsgDOMUISend)
719 IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardMessageToExternalHost, 721 IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardMessageToExternalHost,
720 OnMsgForwardMessageToExternalHost) 722 OnMsgForwardMessageToExternalHost)
721 #ifdef CHROME_PERSONALIZATION 723 #ifdef CHROME_PERSONALIZATION
722 IPC_MESSAGE_HANDLER(ViewHostMsg_PersonalizationEvent, 724 IPC_MESSAGE_HANDLER(ViewHostMsg_PersonalizationEvent,
723 OnPersonalizationEvent) 725 OnPersonalizationEvent)
724 #endif 726 #endif
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 void RenderViewHost::OnMsgOpenURL(const GURL& url, 1048 void RenderViewHost::OnMsgOpenURL(const GURL& url,
1047 const GURL& referrer, 1049 const GURL& referrer,
1048 WindowOpenDisposition disposition) { 1050 WindowOpenDisposition disposition) {
1049 GURL validated_url(url); 1051 GURL validated_url(url);
1050 FilterURL(RendererSecurityPolicy::GetInstance(), 1052 FilterURL(RendererSecurityPolicy::GetInstance(),
1051 process()->pid(), &validated_url); 1053 process()->pid(), &validated_url);
1052 1054
1053 delegate_->RequestOpenURL(validated_url, referrer, disposition); 1055 delegate_->RequestOpenURL(validated_url, referrer, disposition);
1054 } 1056 }
1055 1057
1058 void RenderViewHost::OnMsgDidContentsPreferredWidthChange(const int pref_width) {
1059 delegate_->DidContentsPreferredWidthChange(pref_width);
1060 }
1061
1056 void RenderViewHost::OnMsgDomOperationResponse( 1062 void RenderViewHost::OnMsgDomOperationResponse(
1057 const std::string& json_string, int automation_id) { 1063 const std::string& json_string, int automation_id) {
1058 delegate_->DomOperationResponse(json_string, automation_id); 1064 delegate_->DomOperationResponse(json_string, automation_id);
1059 } 1065 }
1060 1066
1061 void RenderViewHost::OnMsgDOMUISend( 1067 void RenderViewHost::OnMsgDOMUISend(
1062 const std::string& message, const std::string& content) { 1068 const std::string& message, const std::string& content) {
1063 if (!RendererSecurityPolicy::GetInstance()-> 1069 if (!RendererSecurityPolicy::GetInstance()->
1064 HasDOMUIBindings(process()->pid())) { 1070 HasDOMUIBindings(process()->pid())) {
1065 NOTREACHED() << "Blocked unauthorized use of DOMUIBindings."; 1071 NOTREACHED() << "Blocked unauthorized use of DOMUIBindings.";
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 int callback_id) { 1384 int callback_id) {
1379 // TODO(aa): Here is where we can check that this renderer was supposed to be 1385 // TODO(aa): Here is where we can check that this renderer was supposed to be
1380 // able to call extension APIs. 1386 // able to call extension APIs.
1381 extension_function_dispatcher_.HandleRequest(name, args, callback_id); 1387 extension_function_dispatcher_.HandleRequest(name, args, callback_id);
1382 } 1388 }
1383 1389
1384 void RenderViewHost::SendExtensionResponse(int callback_id, 1390 void RenderViewHost::SendExtensionResponse(int callback_id,
1385 const std::string& response) { 1391 const std::string& response) {
1386 Send(new ViewMsg_ExtensionResponse(routing_id(), callback_id, response)); 1392 Send(new ViewMsg_ExtensionResponse(routing_id(), callback_id, response));
1387 } 1393 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698