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