| 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/dom_ui/html_dialog_contents.h" | 5 #include "chrome/browser/dom_ui/html_dialog_contents.h" |
| 6 | 6 |
| 7 #include "chrome/browser/render_view_host.h" | 7 #include "chrome/browser/render_view_host.h" |
| 8 | 8 |
| 9 const char kGearsScheme[] = "gears"; | 9 const char kGearsScheme[] = "gears"; |
| 10 | 10 |
| 11 HtmlDialogContents::HtmlDialogContents(Profile* profile, | 11 HtmlDialogContents::HtmlDialogContents(Profile* profile, |
| 12 SiteInstance* instance, | 12 SiteInstance* instance, |
| 13 RenderViewHostFactory* rvf) | 13 RenderViewHostFactory* rvf) |
| 14 : DOMUIHost(profile, instance, rvf), | 14 : DOMUIHost(profile, instance, rvf), |
| 15 delegate_(NULL) { | 15 delegate_(NULL) { |
| 16 type_ = TAB_CONTENTS_HTML_DIALOG; | 16 set_type(TAB_CONTENTS_HTML_DIALOG); |
| 17 } | 17 } |
| 18 | 18 |
| 19 HtmlDialogContents::~HtmlDialogContents() { | 19 HtmlDialogContents::~HtmlDialogContents() { |
| 20 } | 20 } |
| 21 | 21 |
| 22 void HtmlDialogContents::Init(HtmlDialogContentsDelegate* delegate) { | 22 void HtmlDialogContents::Init(HtmlDialogContentsDelegate* delegate) { |
| 23 delegate_ = delegate; | 23 delegate_ = delegate; |
| 24 | 24 |
| 25 std::string dialog_args; | 25 std::string dialog_args; |
| 26 if (delegate_) | 26 if (delegate_) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 | 69 |
| 70 return WideToASCII(result); | 70 return WideToASCII(result); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void HtmlDialogContents::OnDialogClosed(const Value* content) { | 73 void HtmlDialogContents::OnDialogClosed(const Value* content) { |
| 74 if (delegate_) | 74 if (delegate_) |
| 75 delegate_->OnDialogClosed(GetJsonResponse(content)); | 75 delegate_->OnDialogClosed(GetJsonResponse(content)); |
| 76 } | 76 } |
| 77 | 77 |
| OLD | NEW |