web_dialog_delegate.cc 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. #include "ui/web_dialogs/web_dialog_delegate.h"
  5. #include "ui/base/accelerators/accelerator.h"
  6. namespace ui {
  7. std::u16string WebDialogDelegate::GetAccessibleDialogTitle() const {
  8. return GetDialogTitle();
  9. }
  10. std::string WebDialogDelegate::GetDialogName() const {
  11. return std::string();
  12. }
  13. void WebDialogDelegate::GetMinimumDialogSize(gfx::Size* size) const {
  14. GetDialogSize(size);
  15. }
  16. bool WebDialogDelegate::CanMaximizeDialog() const {
  17. return false;
  18. }
  19. bool WebDialogDelegate::OnDialogCloseRequested() {
  20. return true;
  21. }
  22. bool WebDialogDelegate::ShouldCenterDialogTitleText() const {
  23. return false;
  24. }
  25. bool WebDialogDelegate::ShouldCloseDialogOnEscape() const {
  26. return true;
  27. }
  28. bool WebDialogDelegate::ShouldShowCloseButton() const {
  29. return true;
  30. }
  31. void WebDialogDelegate::OnDialogCloseFromWebUI(
  32. const std::string& json_retval) {
  33. OnDialogClosed(json_retval);
  34. }
  35. bool WebDialogDelegate::HandleContextMenu(
  36. content::RenderFrameHost& render_frame_host,
  37. const content::ContextMenuParams& params) {
  38. return false;
  39. }
  40. bool WebDialogDelegate::HandleOpenURLFromTab(
  41. content::WebContents* source,
  42. const content::OpenURLParams& params,
  43. content::WebContents** out_new_contents) {
  44. return false;
  45. }
  46. bool WebDialogDelegate::HandleShouldOverrideWebContentsCreation() {
  47. return false;
  48. }
  49. std::vector<Accelerator> WebDialogDelegate::GetAccelerators() {
  50. return std::vector<Accelerator>();
  51. }
  52. bool WebDialogDelegate::AcceleratorPressed(const Accelerator& accelerator) {
  53. return false;
  54. }
  55. bool WebDialogDelegate::CheckMediaAccessPermission(
  56. content::RenderFrameHost* render_frame_host,
  57. const GURL& security_origin,
  58. blink::mojom::MediaStreamType type) {
  59. return false;
  60. }
  61. WebDialogDelegate::FrameKind WebDialogDelegate::GetWebDialogFrameKind() const {
  62. return WebDialogDelegate::FrameKind::kNonClient;
  63. }
  64. } // namespace ui