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 namespace test { |
| 10 |
| 11 TestHtmlDialogUIDelegate::TestHtmlDialogUIDelegate(const GURL& url) |
| 12 : url_(url), |
| 13 size_(400, 400) { |
| 14 } |
| 15 |
| 16 TestHtmlDialogUIDelegate::~TestHtmlDialogUIDelegate() { |
| 17 } |
| 18 |
| 19 bool TestHtmlDialogUIDelegate::IsDialogModal() const { |
| 20 return true; |
| 21 } |
| 22 |
| 23 string16 TestHtmlDialogUIDelegate::GetDialogTitle() const { |
| 24 return UTF8ToUTF16("Test"); |
| 25 } |
| 26 |
| 27 GURL TestHtmlDialogUIDelegate::GetDialogContentURL() const { |
| 28 return url_; |
| 29 } |
| 30 |
| 31 void TestHtmlDialogUIDelegate::GetWebUIMessageHandlers( |
| 32 std::vector<WebUIMessageHandler*>* handlers) const { |
| 33 } |
| 34 |
| 35 void TestHtmlDialogUIDelegate::GetDialogSize(gfx::Size* size) const { |
| 36 *size = size_; |
| 37 } |
| 38 |
| 39 std::string TestHtmlDialogUIDelegate::GetDialogArgs() const { |
| 40 return std::string(); |
| 41 } |
| 42 |
| 43 void TestHtmlDialogUIDelegate::OnDialogClosed(const std::string& json_retval) { |
| 44 } |
| 45 |
| 46 void TestHtmlDialogUIDelegate::OnCloseContents(TabContents* source, |
| 47 bool* out_close_dialog) { |
| 48 if (out_close_dialog) |
| 49 *out_close_dialog = true; |
| 50 } |
| 51 |
| 52 bool TestHtmlDialogUIDelegate::ShouldShowDialogTitle() const { |
| 53 return true; |
| 54 } |
| 55 |
| 56 } // namespace test |
OLD | NEW |