| 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 <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlapp.h> | 8 #include <atlapp.h> |
| 9 #include <atlconv.h> | 9 #include <atlconv.h> |
| 10 #include <atlmisc.h> | 10 #include <atlmisc.h> |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 content::RenderViewHost::AddCreatedCallback(rvh_callback_); | 257 content::RenderViewHost::AddCreatedCallback(rvh_callback_); |
| 258 content::WebContentsObserver::Observe(existing_contents); | 258 content::WebContentsObserver::Observe(existing_contents); |
| 259 | 259 |
| 260 BrowserTabContents::AttachTabHelpers(existing_contents); | 260 BrowserTabContents::AttachTabHelpers(existing_contents); |
| 261 web_contents_.reset(existing_contents); | 261 web_contents_.reset(existing_contents); |
| 262 | 262 |
| 263 if (!infobars_enabled) { | 263 if (!infobars_enabled) { |
| 264 InfoBarService* infobar_service = | 264 InfoBarService* infobar_service = |
| 265 InfoBarService::FromWebContents(existing_contents); | 265 InfoBarService::FromWebContents(existing_contents); |
| 266 infobar_service->SetInfoBarsEnabled(false); | 266 infobar_service->set_infobars_enabled(false); |
| 267 } | 267 } |
| 268 | 268 |
| 269 // Start loading initial URL | 269 // Start loading initial URL |
| 270 if (!initial_url.is_empty()) { | 270 if (!initial_url.is_empty()) { |
| 271 // Navigate out of context since we don't have a 'tab_handle_' yet. | 271 // Navigate out of context since we don't have a 'tab_handle_' yet. |
| 272 MessageLoop::current()->PostTask( | 272 MessageLoop::current()->PostTask( |
| 273 FROM_HERE, | 273 FROM_HERE, |
| 274 base::Bind(&ExternalTabContainerWin::Navigate, | 274 base::Bind(&ExternalTabContainerWin::Navigate, |
| 275 weak_factory_.GetWeakPtr(), | 275 weak_factory_.GetWeakPtr(), |
| 276 initial_url, referrer)); | 276 initial_url, referrer)); |
| (...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 if (params.disposition == CURRENT_TAB) { | 1295 if (params.disposition == CURRENT_TAB) { |
| 1296 DCHECK(route_all_top_level_navigations_); | 1296 DCHECK(route_all_top_level_navigations_); |
| 1297 forward_params.disposition = NEW_FOREGROUND_TAB; | 1297 forward_params.disposition = NEW_FOREGROUND_TAB; |
| 1298 } | 1298 } |
| 1299 WebContents* new_contents = | 1299 WebContents* new_contents = |
| 1300 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); | 1300 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); |
| 1301 // support only one navigation for a dummy tab before it is killed. | 1301 // support only one navigation for a dummy tab before it is killed. |
| 1302 widget_->CloseNow(); | 1302 widget_->CloseNow(); |
| 1303 return new_contents; | 1303 return new_contents; |
| 1304 } | 1304 } |
| OLD | NEW |