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

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

Issue 3055009: Use RenderWidget(Host) for full screen (Closed)
Patch Set: Add IPC::SyncMessage dependency. Fix auto complete. Created 10 years, 4 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
OLDNEW
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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 reply->set_reply_error(); 705 reply->set_reply_error();
706 Send(reply); 706 Send(reply);
707 return; 707 return;
708 } 708 }
709 #endif 709 #endif
710 710
711 bool msg_is_ok = true; 711 bool msg_is_ok = true;
712 IPC_BEGIN_MESSAGE_MAP_EX(RenderViewHost, msg, msg_is_ok) 712 IPC_BEGIN_MESSAGE_MAP_EX(RenderViewHost, msg, msg_is_ok)
713 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowView, OnMsgShowView) 713 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowView, OnMsgShowView)
714 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnMsgShowWidget) 714 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnMsgShowWidget)
715 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowFullscreenWidget,
716 OnMsgShowFullscreenWidget)
715 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnMsgRunModal) 717 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnMsgRunModal)
716 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnMsgRenderViewReady) 718 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnMsgRenderViewReady)
717 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewGone, OnMsgRenderViewGone) 719 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewGone, OnMsgRenderViewGone)
718 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_FrameNavigate, OnMsgNavigate(msg)) 720 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_FrameNavigate, OnMsgNavigate(msg))
719 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnMsgUpdateState) 721 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnMsgUpdateState)
720 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTitle, OnMsgUpdateTitle) 722 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTitle, OnMsgUpdateTitle)
721 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateEncoding, OnMsgUpdateEncoding) 723 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateEncoding, OnMsgUpdateEncoding)
722 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnMsgUpdateTargetURL) 724 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnMsgUpdateTargetURL)
723 IPC_MESSAGE_HANDLER(ViewHostMsg_Thumbnail, OnMsgThumbnail) 725 IPC_MESSAGE_HANDLER(ViewHostMsg_Thumbnail, OnMsgThumbnail)
724 IPC_MESSAGE_HANDLER(ViewHostMsg_Snapshot, OnMsgScreenshot) 726 IPC_MESSAGE_HANDLER(ViewHostMsg_Snapshot, OnMsgScreenshot)
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 view->CreateNewWindow(route_id, window_container_type, frame_name); 889 view->CreateNewWindow(route_id, window_container_type, frame_name);
888 } 890 }
889 891
890 void RenderViewHost::CreateNewWidget(int route_id, 892 void RenderViewHost::CreateNewWidget(int route_id,
891 WebKit::WebPopupType popup_type) { 893 WebKit::WebPopupType popup_type) {
892 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 894 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
893 if (view) 895 if (view)
894 view->CreateNewWidget(route_id, popup_type); 896 view->CreateNewWidget(route_id, popup_type);
895 } 897 }
896 898
899 void RenderViewHost::CreateNewFullscreenWidget(
900 int route_id, WebKit::WebPopupType popup_type) {
901 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
902 if (view)
903 view->CreateNewFullscreenWidget(route_id, popup_type);
904 }
905
897 void RenderViewHost::OnMsgShowView(int route_id, 906 void RenderViewHost::OnMsgShowView(int route_id,
898 WindowOpenDisposition disposition, 907 WindowOpenDisposition disposition,
899 const gfx::Rect& initial_pos, 908 const gfx::Rect& initial_pos,
900 bool user_gesture) { 909 bool user_gesture) {
901 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 910 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
902 if (view) { 911 if (view) {
903 view->ShowCreatedWindow(route_id, disposition, initial_pos, user_gesture); 912 view->ShowCreatedWindow(route_id, disposition, initial_pos, user_gesture);
904 Send(new ViewMsg_Move_ACK(route_id)); 913 Send(new ViewMsg_Move_ACK(route_id));
905 } 914 }
906 } 915 }
907 916
908 void RenderViewHost::OnMsgShowWidget(int route_id, 917 void RenderViewHost::OnMsgShowWidget(int route_id,
909 const gfx::Rect& initial_pos) { 918 const gfx::Rect& initial_pos) {
910 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 919 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
911 if (view) { 920 if (view) {
912 view->ShowCreatedWidget(route_id, initial_pos); 921 view->ShowCreatedWidget(route_id, initial_pos);
913 Send(new ViewMsg_Move_ACK(route_id)); 922 Send(new ViewMsg_Move_ACK(route_id));
914 } 923 }
915 } 924 }
916 925
926 void RenderViewHost::OnMsgShowFullscreenWidget(int route_id) {
927 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
928 if (view) {
929 view->ShowCreatedFullscreenWidget(route_id);
930 Send(new ViewMsg_Move_ACK(route_id));
931 }
932 }
933
917 void RenderViewHost::OnMsgRunModal(IPC::Message* reply_msg) { 934 void RenderViewHost::OnMsgRunModal(IPC::Message* reply_msg) {
918 DCHECK(!run_modal_reply_msg_); 935 DCHECK(!run_modal_reply_msg_);
919 run_modal_reply_msg_ = reply_msg; 936 run_modal_reply_msg_ = reply_msg;
920 937
921 // TODO(darin): Bug 1107929: Need to inform our delegate to show this view in 938 // TODO(darin): Bug 1107929: Need to inform our delegate to show this view in
922 // an app-modal fashion. 939 // an app-modal fashion.
923 } 940 }
924 941
925 void RenderViewHost::OnMsgRenderViewReady() { 942 void RenderViewHost::OnMsgRenderViewReady() {
926 WasResized(); 943 WasResized();
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 RenderViewHostDelegate::ContentSettings* content_settings_delegate = 2039 RenderViewHostDelegate::ContentSettings* content_settings_delegate =
2023 delegate_->GetContentSettingsDelegate(); 2040 delegate_->GetContentSettingsDelegate();
2024 if (content_settings_delegate) 2041 if (content_settings_delegate)
2025 content_settings_delegate->OnWebDatabaseAccessed( 2042 content_settings_delegate->OnWebDatabaseAccessed(
2026 url, name, display_name, estimated_size, blocked_by_policy); 2043 url, name, display_name, estimated_size, blocked_by_policy);
2027 } 2044 }
2028 2045
2029 void RenderViewHost::OnSetDisplayingPDFContent() { 2046 void RenderViewHost::OnSetDisplayingPDFContent() {
2030 delegate_->SetDisplayingPDFContent(); 2047 delegate_->SetDisplayingPDFContent();
2031 } 2048 }
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