OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/webui/test_html_dialog_ui_delegate.h" |
| 6 |
| 7 #include "base/utf_string_conversions.h" |
| 8 |
| 9 TestHtmlDialogUIDelegate::TestHtmlDialogUIDelegate(const GURL& url) |
| 10 : url_(url), |
| 11 size_(400, 400) { |
| 12 } |
| 13 |
| 14 TestHtmlDialogUIDelegate::~TestHtmlDialogUIDelegate() { |
| 15 } |
| 16 |
| 17 bool TestHtmlDialogUIDelegate::IsDialogModal() const { |
| 18 return true; |
| 19 } |
| 20 |
| 21 string16 TestHtmlDialogUIDelegate::GetDialogTitle() const { |
| 22 return UTF8ToUTF16("Test"); |
| 23 } |
| 24 |
| 25 GURL TestHtmlDialogUIDelegate::GetDialogContentURL() const { |
| 26 return url_; |
| 27 } |
| 28 |
| 29 void TestHtmlDialogUIDelegate::GetDialogSize(gfx::Size* size) const { |
| 30 *size = size_; |
| 31 } |
| 32 |
| 33 std::string TestHtmlDialogUIDelegate::GetDialogArgs() const { |
| 34 return std::string(); |
| 35 } |
| 36 |
| 37 void TestHtmlDialogUIDelegate::OnCloseContents(TabContents* source, |
| 38 bool* out_close_dialog) { |
| 39 if (out_close_dialog) |
| 40 *out_close_dialog = true; |
| 41 } |
| 42 |
| 43 bool TestHtmlDialogUIDelegate::ShouldShowDialogTitle() const { |
| 44 return true; |
| 45 } |
OLD | NEW |