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

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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 } 553 }
554 554
555 // Never allow downloads. 555 // Never allow downloads.
556 return false; 556 return false;
557 } 557 }
558 558
559 void ExternalTabContainer::RegisterRenderViewHostForAutomation( 559 void ExternalTabContainer::RegisterRenderViewHostForAutomation(
560 RenderViewHost* render_view_host, bool pending_view) { 560 RenderViewHost* render_view_host, bool pending_view) {
561 if (render_view_host) { 561 if (render_view_host) {
562 AutomationResourceMessageFilter::RegisterRenderView( 562 AutomationResourceMessageFilter::RegisterRenderView(
563 render_view_host->process()->id(), 563 render_view_host->process()->GetID(),
564 render_view_host->routing_id(), 564 render_view_host->routing_id(),
565 tab_handle(), 565 tab_handle(),
566 automation_resource_message_filter_, 566 automation_resource_message_filter_,
567 pending_view); 567 pending_view);
568 } 568 }
569 } 569 }
570 570
571 void ExternalTabContainer::RegisterRenderViewHost( 571 void ExternalTabContainer::RegisterRenderViewHost(
572 RenderViewHost* render_view_host) { 572 RenderViewHost* render_view_host) {
573 // RenderViewHost instances that are to be associated with this 573 // RenderViewHost instances that are to be associated with this
574 // ExternalTabContainer should share the same resource request automation 574 // ExternalTabContainer should share the same resource request automation
575 // settings. 575 // settings.
576 RegisterRenderViewHostForAutomation( 576 RegisterRenderViewHostForAutomation(
577 render_view_host, 577 render_view_host,
578 false); // Network requests should not be handled later. 578 false); // Network requests should not be handled later.
579 } 579 }
580 580
581 void ExternalTabContainer::UnregisterRenderViewHost( 581 void ExternalTabContainer::UnregisterRenderViewHost(
582 RenderViewHost* render_view_host) { 582 RenderViewHost* render_view_host) {
583 // Undo the resource automation registration performed in 583 // Undo the resource automation registration performed in
584 // ExternalTabContainer::RegisterRenderViewHost. 584 // ExternalTabContainer::RegisterRenderViewHost.
585 if (render_view_host) { 585 if (render_view_host) {
586 AutomationResourceMessageFilter::UnRegisterRenderView( 586 AutomationResourceMessageFilter::UnRegisterRenderView(
587 render_view_host->process()->id(), 587 render_view_host->process()->GetID(),
588 render_view_host->routing_id()); 588 render_view_host->routing_id());
589 } 589 }
590 } 590 }
591 591
592 content::JavaScriptDialogCreator* 592 content::JavaScriptDialogCreator*
593 ExternalTabContainer::GetJavaScriptDialogCreator() { 593 ExternalTabContainer::GetJavaScriptDialogCreator() {
594 return GetJavaScriptDialogCreatorInstance(); 594 return GetJavaScriptDialogCreatorInstance();
595 } 595 }
596 596
597 bool ExternalTabContainer::HandleContextMenu(const ContextMenuParams& params) { 597 bool ExternalTabContainer::HandleContextMenu(const ContextMenuParams& params) {
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 if (focus_manager_) 1085 if (focus_manager_)
1086 focus_manager_->RegisterAccelerator(accelerator, this); 1086 focus_manager_->RegisterAccelerator(accelerator, this);
1087 } 1087 }
1088 } 1088 }
1089 1089
1090 void ExternalTabContainer::OnReinitialize() { 1090 void ExternalTabContainer::OnReinitialize() {
1091 if (load_requests_via_automation_) { 1091 if (load_requests_via_automation_) {
1092 RenderViewHost* rvh = tab_contents_->render_view_host(); 1092 RenderViewHost* rvh = tab_contents_->render_view_host();
1093 if (rvh) { 1093 if (rvh) {
1094 AutomationResourceMessageFilter::ResumePendingRenderView( 1094 AutomationResourceMessageFilter::ResumePendingRenderView(
1095 rvh->process()->id(), rvh->routing_id(), 1095 rvh->process()->GetID(), rvh->routing_id(),
1096 tab_handle_, automation_resource_message_filter_); 1096 tab_handle_, automation_resource_message_filter_);
1097 } 1097 }
1098 } 1098 }
1099 1099
1100 NavigationStateChanged(tab_contents(), 0); 1100 NavigationStateChanged(tab_contents(), 0);
1101 ServicePendingOpenURLRequests(); 1101 ServicePendingOpenURLRequests();
1102 } 1102 }
1103 1103
1104 void ExternalTabContainer::ServicePendingOpenURLRequests() { 1104 void ExternalTabContainer::ServicePendingOpenURLRequests() {
1105 DCHECK(pending()); 1105 DCHECK(pending());
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 if (params.disposition == CURRENT_TAB) { 1175 if (params.disposition == CURRENT_TAB) {
1176 DCHECK(route_all_top_level_navigations_); 1176 DCHECK(route_all_top_level_navigations_);
1177 forward_params.disposition = NEW_FOREGROUND_TAB; 1177 forward_params.disposition = NEW_FOREGROUND_TAB;
1178 } 1178 }
1179 TabContents* new_contents = 1179 TabContents* new_contents =
1180 ExternalTabContainer::OpenURLFromTab(source, forward_params); 1180 ExternalTabContainer::OpenURLFromTab(source, forward_params);
1181 // support only one navigation for a dummy tab before it is killed. 1181 // support only one navigation for a dummy tab before it is killed.
1182 ::DestroyWindow(GetNativeView()); 1182 ::DestroyWindow(GetNativeView());
1183 return new_contents; 1183 return new_contents;
1184 } 1184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698