[email protected] | 20c07f8e | 2012-05-31 08:43:14 | [diff] [blame] | 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 "ui/web_dialogs/web_dialog_delegate.h" | ||||
6 | |||||
warx | 9e608ed | 2017-05-15 19:30:59 | [diff] [blame] | 7 | #include "ui/base/accelerators/accelerator.h" |
8 | |||||
[email protected] | 20c07f8e | 2012-05-31 08:43:14 | [diff] [blame] | 9 | namespace ui { |
10 | |||||
James Wallace-Lee | 45d4385b | 2018-08-31 21:19:46 | [diff] [blame] | 11 | base::string16 WebDialogDelegate::GetAccessibleDialogTitle() const { |
12 | return GetDialogTitle(); | ||||
13 | } | ||||
14 | |||||
[email protected] | 20c07f8e | 2012-05-31 08:43:14 | [diff] [blame] | 15 | std::string WebDialogDelegate::GetDialogName() const { |
16 | return std::string(); | ||||
17 | } | ||||
18 | |||||
19 | void WebDialogDelegate::GetMinimumDialogSize(gfx::Size* size) const { | ||||
20 | GetDialogSize(size); | ||||
21 | } | ||||
22 | |||||
[email protected] | 1f2b2fce | 2013-12-02 21:46:59 | [diff] [blame] | 23 | bool WebDialogDelegate::CanCloseDialog() const { |
24 | return true; | ||||
25 | } | ||||
26 | |||||
[email protected] | 0251a8ee | 2014-05-12 16:08:26 | [diff] [blame] | 27 | bool WebDialogDelegate::CanResizeDialog() const { |
28 | return true; | ||||
29 | } | ||||
30 | |||||
[email protected] | 9d6c803b | 2013-01-31 02:09:49 | [diff] [blame] | 31 | void WebDialogDelegate::OnDialogCloseFromWebUI( |
32 | const std::string& json_retval) { | ||||
33 | OnDialogClosed(json_retval); | ||||
34 | } | ||||
35 | |||||
[email protected] | 20c07f8e | 2012-05-31 08:43:14 | [diff] [blame] | 36 | bool WebDialogDelegate::HandleContextMenu( |
37 | const content::ContextMenuParams& params) { | ||||
38 | return false; | ||||
39 | } | ||||
40 | |||||
41 | bool WebDialogDelegate::HandleOpenURLFromTab( | ||||
42 | content::WebContents* source, | ||||
43 | const content::OpenURLParams& params, | ||||
44 | content::WebContents** out_new_contents) { | ||||
45 | return false; | ||||
46 | } | ||||
47 | |||||
ginkage | 747c10c | 2015-02-03 11:14:49 | [diff] [blame] | 48 | bool WebDialogDelegate::HandleShouldCreateWebContents() { |
49 | return true; | ||||
50 | } | ||||
51 | |||||
warx | 9e608ed | 2017-05-15 19:30:59 | [diff] [blame] | 52 | std::vector<Accelerator> WebDialogDelegate::GetAccelerators() { |
53 | return std::vector<Accelerator>(); | ||||
54 | } | ||||
55 | |||||
56 | bool WebDialogDelegate::AcceleratorPressed(const Accelerator& accelerator) { | ||||
57 | return false; | ||||
58 | } | ||||
59 | |||||
[email protected] | 20c07f8e | 2012-05-31 08:43:14 | [diff] [blame] | 60 | } // namespace ui |