| 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/html_dialog_view.h" | 5 #include "chrome/browser/views/html_dialog_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser.h" | 7 #include "chrome/browser/browser.h" |
| 8 #include "chrome/views/root_view.h" | 8 #include "chrome/views/root_view.h" |
| 9 #include "chrome/views/window.h" | 9 #include "chrome/views/window.h" |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 DCHECK(parent_browser); | 21 DCHECK(parent_browser); |
| 22 DCHECK(profile); | 22 DCHECK(profile); |
| 23 } | 23 } |
| 24 | 24 |
| 25 HtmlDialogView::~HtmlDialogView() { | 25 HtmlDialogView::~HtmlDialogView() { |
| 26 } | 26 } |
| 27 | 27 |
| 28 //////////////////////////////////////////////////////////////////////////////// | 28 //////////////////////////////////////////////////////////////////////////////// |
| 29 // HtmlDialogView, ChromeViews::View implementation: | 29 // HtmlDialogView, ChromeViews::View implementation: |
| 30 | 30 |
| 31 void HtmlDialogView::GetPreferredSize(CSize *out) { | 31 gfx::Size HtmlDialogView::GetPreferredSize() { |
| 32 delegate_->GetDialogSize(out); | 32 CSize out; |
| 33 delegate_->GetDialogSize(&out); |
| 34 return gfx::Size(out.cx, out.cy); |
| 33 } | 35 } |
| 34 | 36 |
| 35 //////////////////////////////////////////////////////////////////////////////// | 37 //////////////////////////////////////////////////////////////////////////////// |
| 36 // HtmlDialogView, ChromeViews::WindowDelegate implementation: | 38 // HtmlDialogView, ChromeViews::WindowDelegate implementation: |
| 37 | 39 |
| 38 bool HtmlDialogView::CanResize() const { | 40 bool HtmlDialogView::CanResize() const { |
| 39 return true; | 41 return true; |
| 40 } | 42 } |
| 41 | 43 |
| 42 bool HtmlDialogView::IsModal() const { | 44 bool HtmlDialogView::IsModal() const { |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // Now Init the DOMView. This view runs in its own process to render the html. | 162 // Now Init the DOMView. This view runs in its own process to render the html. |
| 161 DOMView::Init(profile_, NULL); | 163 DOMView::Init(profile_, NULL); |
| 162 | 164 |
| 163 // Make sure this new TabContents we just created in Init() knows about us. | 165 // Make sure this new TabContents we just created in Init() knows about us. |
| 164 DCHECK(host_->type() == TAB_CONTENTS_HTML_DIALOG); | 166 DCHECK(host_->type() == TAB_CONTENTS_HTML_DIALOG); |
| 165 HtmlDialogContents* host = static_cast<HtmlDialogContents*>(host_); | 167 HtmlDialogContents* host = static_cast<HtmlDialogContents*>(host_); |
| 166 host->Init(this); | 168 host->Init(this); |
| 167 host->set_delegate(this); | 169 host->set_delegate(this); |
| 168 } | 170 } |
| 169 | 171 |
| OLD | NEW |