| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/dom_view.h" | 5 #include "chrome/browser/views/dom_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/dom_ui/dom_ui_host.h" | 7 #include "chrome/browser/dom_ui/dom_ui_host.h" |
| 8 #include "chrome/views/container.h" | 8 #include "chrome/views/container.h" |
| 9 | 9 |
| 10 DOMView::DOMView(const GURL& contents) | 10 DOMView::DOMView(const GURL& contents) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // a DOMUIHostFactory rather than TabContentsFactory, because DOMView's | 28 // a DOMUIHostFactory rather than TabContentsFactory, because DOMView's |
| 29 // should only be associated with instances of DOMUIHost. | 29 // should only be associated with instances of DOMUIHost. |
| 30 TabContentsType type = TabContents::TypeForURL(&contents_); | 30 TabContentsType type = TabContents::TypeForURL(&contents_); |
| 31 TabContents* tab_contents = TabContents::CreateWithType(type, | 31 TabContents* tab_contents = TabContents::CreateWithType(type, |
| 32 GetContainer()->GetHWND(), profile, instance); | 32 GetContainer()->GetHWND(), profile, instance); |
| 33 host_ = tab_contents->AsDOMUIHost(); | 33 host_ = tab_contents->AsDOMUIHost(); |
| 34 DCHECK(host_); | 34 DCHECK(host_); |
| 35 | 35 |
| 36 views::HWNDView::Attach(host_->GetContainerHWND()); | 36 views::HWNDView::Attach(host_->GetContainerHWND()); |
| 37 host_->SetupController(profile); | 37 host_->SetupController(profile); |
| 38 host_->controller()->LoadURL(contents_, PageTransition::START_PAGE); | 38 host_->controller()->LoadURL(contents_, GURL(), PageTransition::START_PAGE); |
| 39 return true; | 39 return true; |
| 40 } | 40 } |
| 41 | 41 |
| OLD | NEW |