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

Unified Diff: chrome/browser/external_tab_container_win.cc

Issue 8414030: Relanding this as the earlier attempt broke chrome frame tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/automation/automation_resource_message_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/external_tab_container_win.cc
===================================================================
--- chrome/browser/external_tab_container_win.cc (revision 107766)
+++ chrome/browser/external_tab_container_win.cc (working copy)
@@ -219,6 +219,8 @@
content::Source<TabContents>(tab_contents_->tab_contents()));
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
content::NotificationService::AllSources());
+ registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED,
+ content::NotificationService::AllSources());
TabContentsObserver::Observe(tab_contents_->tab_contents());
@@ -838,33 +840,33 @@
break;
}
case content::NOTIFICATION_NAV_ENTRY_COMMITTED: {
- if (ignore_next_load_notification_) {
- ignore_next_load_notification_ = false;
- return;
- }
+ if (ignore_next_load_notification_) {
+ ignore_next_load_notification_ = false;
+ return;
+ }
- const content::LoadCommittedDetails* commit =
- content::Details<content::LoadCommittedDetails>(details).ptr();
+ const content::LoadCommittedDetails* commit =
+ content::Details<content::LoadCommittedDetails>(details).ptr();
- if (commit->http_status_code >= kHttpClientErrorStart &&
- commit->http_status_code <= kHttpServerErrorEnd) {
- automation_->Send(new AutomationMsg_NavigationFailed(
- tab_handle_, commit->http_status_code, commit->entry->url()));
+ if (commit->http_status_code >= kHttpClientErrorStart &&
+ commit->http_status_code <= kHttpServerErrorEnd) {
+ automation_->Send(new AutomationMsg_NavigationFailed(
+ tab_handle_, commit->http_status_code, commit->entry->url()));
- ignore_next_load_notification_ = true;
- } else {
- NavigationInfo navigation_info;
- // When the previous entry index is invalid, it will be -1, which
- // will still make the computation come out right (navigating to the
- // 0th entry will be +1).
- if (InitNavigationInfo(&navigation_info, commit->type,
- commit->previous_entry_index -
- tab_contents_->controller().last_committed_entry_index()))
- automation_->Send(new AutomationMsg_DidNavigate(tab_handle_,
- navigation_info));
- }
- break;
+ ignore_next_load_notification_ = true;
+ } else {
+ NavigationInfo navigation_info;
+ // When the previous entry index is invalid, it will be -1, which
+ // will still make the computation come out right (navigating to the
+ // 0th entry will be +1).
+ if (InitNavigationInfo(&navigation_info, commit->type,
+ commit->previous_entry_index -
+ tab_contents_->controller().last_committed_entry_index()))
+ automation_->Send(new AutomationMsg_DidNavigate(tab_handle_,
+ navigation_info));
}
+ break;
+ }
case content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR: {
const ProvisionalLoadDetails* load_details =
content::Details<ProvisionalLoadDetails>(details).ptr();
@@ -888,6 +890,13 @@
}
break;
}
+ case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED: {
+ if (load_requests_via_automation_) {
+ RenderViewHost* rvh = content::Source<RenderViewHost>(source).ptr();
+ RegisterRenderViewHostForAutomation(rvh, false);
+ }
+ break;
+ }
default:
NOTREACHED();
}
« no previous file with comments | « chrome/browser/automation/automation_resource_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698