inspectable_web_contents_view_mac.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Copyright (c) 2013 Adam Roben <[email protected]>. All rights reserved.
  3. // Use of this source code is governed by a BSD-style license that can be
  4. // found in the LICENSE-CHROMIUM file.
  5. #ifndef ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_
  6. #define ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_
  7. #include "shell/browser/ui/inspectable_web_contents_view.h"
  8. @class ElectronInspectableWebContentsView;
  9. #if !defined(__has_feature) || !__has_feature(objc_arc)
  10. #error "This file requires ARC support."
  11. #endif
  12. namespace electron {
  13. class InspectableWebContentsViewMac : public InspectableWebContentsView {
  14. public:
  15. explicit InspectableWebContentsViewMac(
  16. InspectableWebContents* inspectable_web_contents);
  17. InspectableWebContentsViewMac(const InspectableWebContentsViewMac&) = delete;
  18. InspectableWebContentsViewMac& operator=(
  19. const InspectableWebContentsViewMac&) = delete;
  20. ~InspectableWebContentsViewMac() override;
  21. gfx::NativeView GetNativeView() const override;
  22. void ShowDevTools(bool activate) override;
  23. void CloseDevTools() override;
  24. bool IsDevToolsViewShowing() override;
  25. bool IsDevToolsViewFocused() override;
  26. void SetIsDocked(bool docked, bool activate) override;
  27. void SetContentsResizingStrategy(
  28. const DevToolsContentsResizingStrategy& strategy) override;
  29. void SetTitle(const std::u16string& title) override;
  30. private:
  31. ElectronInspectableWebContentsView* __strong view_;
  32. };
  33. } // namespace electron
  34. #endif // ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_