TabController.h 985 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Forward.h>
  8. #include <LibURL/URL.h>
  9. #import <System/Cocoa.h>
  10. struct TabSettings {
  11. BOOL should_show_line_box_borders { NO };
  12. BOOL scripting_enabled { YES };
  13. BOOL block_popups { YES };
  14. BOOL same_origin_policy_enabled { NO };
  15. ByteString user_agent_name { "Disabled"sv };
  16. };
  17. @interface TabController : NSWindowController <NSWindowDelegate>
  18. - (instancetype)init;
  19. - (void)loadURL:(URL::URL const&)url;
  20. - (void)loadHTML:(StringView)html url:(URL::URL const&)url;
  21. - (void)onLoadStart:(URL::URL const&)url isRedirect:(BOOL)isRedirect;
  22. - (void)onTitleChange:(ByteString const&)title;
  23. - (void)navigateBack:(id)sender;
  24. - (void)navigateForward:(id)sender;
  25. - (void)reload:(id)sender;
  26. - (void)clearHistory;
  27. - (void)debugRequest:(ByteString const&)request argument:(ByteString const&)argument;
  28. - (void)focusLocationToolbarItem;
  29. @end