test_web_contents_modal_dialog_manager_delegate.cc 981 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2013 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 "components/web_modal/test_web_contents_modal_dialog_manager_delegate.h"
  5. namespace web_modal {
  6. TestWebContentsModalDialogManagerDelegate::
  7. TestWebContentsModalDialogManagerDelegate()
  8. : web_contents_visible_(true),
  9. web_contents_blocked_(false),
  10. web_contents_modal_dialog_host_(nullptr) {}
  11. void TestWebContentsModalDialogManagerDelegate::SetWebContentsBlocked(
  12. content::WebContents* web_contents,
  13. bool blocked) {
  14. web_contents_blocked_ = blocked;
  15. }
  16. WebContentsModalDialogHost* TestWebContentsModalDialogManagerDelegate::
  17. GetWebContentsModalDialogHost() {
  18. return web_contents_modal_dialog_host_;
  19. }
  20. bool TestWebContentsModalDialogManagerDelegate::IsWebContentsVisible(
  21. content::WebContents* web_contents) {
  22. return web_contents_visible_;
  23. }
  24. } // namespace web_modal