web_contents_view_delegate_impl.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2020 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. #ifndef WEBLAYER_BROWSER_WEB_CONTENTS_VIEW_DELEGATE_IMPL_H_
  5. #define WEBLAYER_BROWSER_WEB_CONTENTS_VIEW_DELEGATE_IMPL_H_
  6. #include "base/memory/raw_ptr.h"
  7. #include "content/public/browser/web_contents_view_delegate.h"
  8. namespace content {
  9. class WebContents;
  10. }
  11. namespace weblayer {
  12. class WebContentsViewDelegateImpl : public content::WebContentsViewDelegate {
  13. public:
  14. explicit WebContentsViewDelegateImpl(content::WebContents* web_contents);
  15. WebContentsViewDelegateImpl(const WebContentsViewDelegateImpl&) = delete;
  16. WebContentsViewDelegateImpl& operator=(const WebContentsViewDelegateImpl&) =
  17. delete;
  18. ~WebContentsViewDelegateImpl() override;
  19. // WebContentsViewDelegate overrides.
  20. void ShowContextMenu(content::RenderFrameHost& render_frame_host,
  21. const content::ContextMenuParams& params) override;
  22. private:
  23. raw_ptr<content::WebContents> web_contents_;
  24. };
  25. } // namespace weblayer
  26. #endif // WEBLAYER_BROWSER_WEB_CONTENTS_VIEW_DELEGATE_IMPL_H_