| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/external_tab_container_win.h" | 5 #include "chrome/browser/ui/views/external_tab_container_win.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 if (InitNavigationInfo(&nav_info, content::NAVIGATION_TYPE_NAV_IGNORE, 0)) | 458 if (InitNavigationInfo(&nav_info, content::NAVIGATION_TYPE_NAV_IGNORE, 0)) |
| 459 automation_->Send(new AutomationMsg_NavigationStateChanged( | 459 automation_->Send(new AutomationMsg_NavigationStateChanged( |
| 460 tab_handle_, changed_flags, nav_info)); | 460 tab_handle_, changed_flags, nav_info)); |
| 461 } | 461 } |
| 462 } | 462 } |
| 463 | 463 |
| 464 void ExternalTabContainerWin::AddNewContents(WebContents* source, | 464 void ExternalTabContainerWin::AddNewContents(WebContents* source, |
| 465 WebContents* new_contents, | 465 WebContents* new_contents, |
| 466 WindowOpenDisposition disposition, | 466 WindowOpenDisposition disposition, |
| 467 const gfx::Rect& initial_pos, | 467 const gfx::Rect& initial_pos, |
| 468 bool user_gesture) { | 468 bool user_gesture, |
| 469 bool* was_blocked) { |
| 469 if (!automation_) { | 470 if (!automation_) { |
| 470 DCHECK(pending_); | 471 DCHECK(pending_); |
| 471 LOG(ERROR) << "Invalid automation provider. Dropping new contents notify"; | 472 LOG(ERROR) << "Invalid automation provider. Dropping new contents notify"; |
| 472 delete new_contents; | 473 delete new_contents; |
| 473 return; | 474 return; |
| 474 } | 475 } |
| 475 | 476 |
| 476 scoped_refptr<ExternalTabContainerWin> new_container; | 477 scoped_refptr<ExternalTabContainerWin> new_container; |
| 477 // If the host is a browser like IE8, then the URL being navigated to in the | 478 // If the host is a browser like IE8, then the URL being navigated to in the |
| 478 // new tab contents could potentially navigate back to Chrome from a new | 479 // new tab contents could potentially navigate back to Chrome from a new |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1271 if (params.disposition == CURRENT_TAB) { | 1272 if (params.disposition == CURRENT_TAB) { |
| 1272 DCHECK(route_all_top_level_navigations_); | 1273 DCHECK(route_all_top_level_navigations_); |
| 1273 forward_params.disposition = NEW_FOREGROUND_TAB; | 1274 forward_params.disposition = NEW_FOREGROUND_TAB; |
| 1274 } | 1275 } |
| 1275 WebContents* new_contents = | 1276 WebContents* new_contents = |
| 1276 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); | 1277 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); |
| 1277 // support only one navigation for a dummy tab before it is killed. | 1278 // support only one navigation for a dummy tab before it is killed. |
| 1278 ::DestroyWindow(GetNativeView()); | 1279 ::DestroyWindow(GetNativeView()); |
| 1279 return new_contents; | 1280 return new_contents; |
| 1280 } | 1281 } |
| OLD | NEW |