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

Side by Side Diff: chrome/browser/external_tab_container_win.cc

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/external_tab_container_win.h" 5 #include "chrome/browser/external_tab_container_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 } 554 }
555 555
556 // Never allow downloads. 556 // Never allow downloads.
557 return false; 557 return false;
558 } 558 }
559 559
560 void ExternalTabContainer::RegisterRenderViewHostForAutomation( 560 void ExternalTabContainer::RegisterRenderViewHostForAutomation(
561 RenderViewHost* render_view_host, bool pending_view) { 561 RenderViewHost* render_view_host, bool pending_view) {
562 if (render_view_host) { 562 if (render_view_host) {
563 AutomationResourceMessageFilter::RegisterRenderView( 563 AutomationResourceMessageFilter::RegisterRenderView(
564 render_view_host->process()->id(), 564 render_view_host->process()->GetID(),
565 render_view_host->routing_id(), 565 render_view_host->routing_id(),
566 tab_handle(), 566 tab_handle(),
567 automation_resource_message_filter_, 567 automation_resource_message_filter_,
568 pending_view); 568 pending_view);
569 } 569 }
570 } 570 }
571 571
572 void ExternalTabContainer::RegisterRenderViewHost( 572 void ExternalTabContainer::RegisterRenderViewHost(
573 RenderViewHost* render_view_host) { 573 RenderViewHost* render_view_host) {
574 // RenderViewHost instances that are to be associated with this 574 // RenderViewHost instances that are to be associated with this
575 // ExternalTabContainer should share the same resource request automation 575 // ExternalTabContainer should share the same resource request automation
576 // settings. 576 // settings.
577 RegisterRenderViewHostForAutomation( 577 RegisterRenderViewHostForAutomation(
578 render_view_host, 578 render_view_host,
579 false); // Network requests should not be handled later. 579 false); // Network requests should not be handled later.
580 } 580 }
581 581
582 void ExternalTabContainer::UnregisterRenderViewHost( 582 void ExternalTabContainer::UnregisterRenderViewHost(
583 RenderViewHost* render_view_host) { 583 RenderViewHost* render_view_host) {
584 // Undo the resource automation registration performed in 584 // Undo the resource automation registration performed in
585 // ExternalTabContainer::RegisterRenderViewHost. 585 // ExternalTabContainer::RegisterRenderViewHost.
586 if (render_view_host) { 586 if (render_view_host) {
587 AutomationResourceMessageFilter::UnRegisterRenderView( 587 AutomationResourceMessageFilter::UnRegisterRenderView(
588 render_view_host->process()->id(), 588 render_view_host->process()->GetID(),
589 render_view_host->routing_id()); 589 render_view_host->routing_id());
590 } 590 }
591 } 591 }
592 592
593 content::JavaScriptDialogCreator* 593 content::JavaScriptDialogCreator*
594 ExternalTabContainer::GetJavaScriptDialogCreator() { 594 ExternalTabContainer::GetJavaScriptDialogCreator() {
595 return GetJavaScriptDialogCreatorInstance(); 595 return GetJavaScriptDialogCreatorInstance();
596 } 596 }
597 597
598 bool ExternalTabContainer::HandleContextMenu(const ContextMenuParams& params) { 598 bool ExternalTabContainer::HandleContextMenu(const ContextMenuParams& params) {
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 if (focus_manager_) 1086 if (focus_manager_)
1087 focus_manager_->RegisterAccelerator(accelerator, this); 1087 focus_manager_->RegisterAccelerator(accelerator, this);
1088 } 1088 }
1089 } 1089 }
1090 1090
1091 void ExternalTabContainer::OnReinitialize() { 1091 void ExternalTabContainer::OnReinitialize() {
1092 if (load_requests_via_automation_) { 1092 if (load_requests_via_automation_) {
1093 RenderViewHost* rvh = tab_contents_->render_view_host(); 1093 RenderViewHost* rvh = tab_contents_->render_view_host();
1094 if (rvh) { 1094 if (rvh) {
1095 AutomationResourceMessageFilter::ResumePendingRenderView( 1095 AutomationResourceMessageFilter::ResumePendingRenderView(
1096 rvh->process()->id(), rvh->routing_id(), 1096 rvh->process()->GetID(), rvh->routing_id(),
1097 tab_handle_, automation_resource_message_filter_); 1097 tab_handle_, automation_resource_message_filter_);
1098 } 1098 }
1099 } 1099 }
1100 1100
1101 NavigationStateChanged(tab_contents(), 0); 1101 NavigationStateChanged(tab_contents(), 0);
1102 ServicePendingOpenURLRequests(); 1102 ServicePendingOpenURLRequests();
1103 } 1103 }
1104 1104
1105 void ExternalTabContainer::ServicePendingOpenURLRequests() { 1105 void ExternalTabContainer::ServicePendingOpenURLRequests() {
1106 DCHECK(pending()); 1106 DCHECK(pending());
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 if (params.disposition == CURRENT_TAB) { 1176 if (params.disposition == CURRENT_TAB) {
1177 DCHECK(route_all_top_level_navigations_); 1177 DCHECK(route_all_top_level_navigations_);
1178 forward_params.disposition = NEW_FOREGROUND_TAB; 1178 forward_params.disposition = NEW_FOREGROUND_TAB;
1179 } 1179 }
1180 TabContents* new_contents = 1180 TabContents* new_contents =
1181 ExternalTabContainer::OpenURLFromTab(source, forward_params); 1181 ExternalTabContainer::OpenURLFromTab(source, forward_params);
1182 // support only one navigation for a dummy tab before it is killed. 1182 // support only one navigation for a dummy tab before it is killed.
1183 ::DestroyWindow(GetNativeView()); 1183 ::DestroyWindow(GetNativeView());
1184 return new_contents; 1184 return new_contents;
1185 } 1185 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698