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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // dialog closing. This happens if the user clicks the Close button on the | 54 // dialog closing. This happens if the user clicks the Close button on the |
55 // dialog. | 55 // dialog. |
56 if (delegate_) | 56 if (delegate_) |
57 OnDialogClosed(""); | 57 OnDialogClosed(""); |
58 } | 58 } |
59 | 59 |
60 views::View* HtmlDialogView::GetContentsView() { | 60 views::View* HtmlDialogView::GetContentsView() { |
61 return this; | 61 return this; |
62 } | 62 } |
63 | 63 |
| 64 views::View* HtmlDialogView::GetInitiallyFocusedView() { |
| 65 return this; |
| 66 } |
| 67 |
64 //////////////////////////////////////////////////////////////////////////////// | 68 //////////////////////////////////////////////////////////////////////////////// |
65 // HtmlDialogContentsDelegate implementation: | 69 // HtmlDialogContentsDelegate implementation: |
66 | 70 |
67 GURL HtmlDialogView::GetDialogContentURL() const { | 71 GURL HtmlDialogView::GetDialogContentURL() const { |
68 return delegate_->GetDialogContentURL(); | 72 return delegate_->GetDialogContentURL(); |
69 } | 73 } |
70 | 74 |
71 void HtmlDialogView::GetDialogSize(CSize* size) const { | 75 void HtmlDialogView::GetDialogSize(CSize* size) const { |
72 return delegate_->GetDialogSize(size); | 76 return delegate_->GetDialogSize(size); |
73 } | 77 } |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // Now Init the DOMView. This view runs in its own process to render the html. | 168 // Now Init the DOMView. This view runs in its own process to render the html. |
165 DOMView::Init(profile_, NULL); | 169 DOMView::Init(profile_, NULL); |
166 | 170 |
167 // Make sure this new TabContents we just created in Init() knows about us. | 171 // Make sure this new TabContents we just created in Init() knows about us. |
168 DCHECK(host_->type() == TAB_CONTENTS_HTML_DIALOG); | 172 DCHECK(host_->type() == TAB_CONTENTS_HTML_DIALOG); |
169 HtmlDialogContents* host = static_cast<HtmlDialogContents*>(host_); | 173 HtmlDialogContents* host = static_cast<HtmlDialogContents*>(host_); |
170 host->Init(this); | 174 host->Init(this); |
171 host->set_delegate(this); | 175 host->set_delegate(this); |
172 } | 176 } |
173 | 177 |
OLD | NEW |