| 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 | 8 | 
| 9 DOMView::DOMView(const GURL& contents) | 9 DOMView::DOMView(const GURL& contents) | 
| 10     : contents_(contents), initialized_(false), host_(NULL) { | 10     : contents_(contents), initialized_(false), host_(NULL) { | 
|  | 11   SetFocusable(true); | 
| 11 } | 12 } | 
| 12 | 13 | 
| 13 DOMView::~DOMView() { | 14 DOMView::~DOMView() { | 
| 14   if (host_) { | 15   if (host_) { | 
| 15     Detach(); | 16     Detach(); | 
| 16     host_->Destroy(); | 17     host_->Destroy(); | 
| 17     host_ = NULL; | 18     host_ = NULL; | 
| 18   } | 19   } | 
| 19 } | 20 } | 
| 20 | 21 | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 31                                                           instance); | 32                                                           instance); | 
| 32   host_ = tab_contents->AsDOMUIHost(); | 33   host_ = tab_contents->AsDOMUIHost(); | 
| 33   DCHECK(host_); | 34   DCHECK(host_); | 
| 34 | 35 | 
| 35   views::HWNDView::Attach(host_->GetNativeView()); | 36   views::HWNDView::Attach(host_->GetNativeView()); | 
| 36   host_->SetupController(profile); | 37   host_->SetupController(profile); | 
| 37   host_->controller()->LoadURL(contents_, GURL(), PageTransition::START_PAGE); | 38   host_->controller()->LoadURL(contents_, GURL(), PageTransition::START_PAGE); | 
| 38   return true; | 39   return true; | 
| 39 } | 40 } | 
| 40 | 41 | 
| OLD | NEW | 
|---|