Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1406)

Side by Side Diff: chrome/browser/ui/webui/test_html_dialog_ui_delegate.cc

Issue 10214001: WebDialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 using content::WebContents;
10 using content::WebUIMessageHandler;
11
12 namespace test {
13
14 TestHtmlDialogUIDelegate::TestHtmlDialogUIDelegate(const GURL& url)
15 : url_(url),
16 size_(400, 400) {
17 }
18
19 TestHtmlDialogUIDelegate::~TestHtmlDialogUIDelegate() {
20 }
21
22 ui::ModalType TestHtmlDialogUIDelegate::GetDialogModalType() const {
23 return ui::MODAL_TYPE_WINDOW;
24 }
25
26 string16 TestHtmlDialogUIDelegate::GetDialogTitle() const {
27 return UTF8ToUTF16("Test");
28 }
29
30 GURL TestHtmlDialogUIDelegate::GetDialogContentURL() const {
31 return url_;
32 }
33
34 void TestHtmlDialogUIDelegate::GetWebUIMessageHandlers(
35 std::vector<WebUIMessageHandler*>* handlers) const {
36 }
37
38 void TestHtmlDialogUIDelegate::GetDialogSize(gfx::Size* size) const {
39 *size = size_;
40 }
41
42 std::string TestHtmlDialogUIDelegate::GetDialogArgs() const {
43 return std::string();
44 }
45
46 void TestHtmlDialogUIDelegate::OnDialogClosed(const std::string& json_retval) {
47 }
48
49 void TestHtmlDialogUIDelegate::OnCloseContents(WebContents* source,
50 bool* out_close_dialog) {
51 if (out_close_dialog)
52 *out_close_dialog = true;
53 }
54
55 bool TestHtmlDialogUIDelegate::ShouldShowDialogTitle() const {
56 return true;
57 }
58
59 } // namespace test
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/test_html_dialog_ui_delegate.h ('k') | chrome/browser/ui/webui/test_web_dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698