electron_navigation_throttle.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (c) 2018 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ELECTRON_SHELL_BROWSER_ELECTRON_NAVIGATION_THROTTLE_H_
  5. #define ELECTRON_SHELL_BROWSER_ELECTRON_NAVIGATION_THROTTLE_H_
  6. #include "content/public/browser/navigation_throttle.h"
  7. namespace electron {
  8. class ElectronNavigationThrottle : public content::NavigationThrottle {
  9. public:
  10. explicit ElectronNavigationThrottle(content::NavigationHandle* handle);
  11. ~ElectronNavigationThrottle() override;
  12. // disable copy
  13. ElectronNavigationThrottle(const ElectronNavigationThrottle&) = delete;
  14. ElectronNavigationThrottle& operator=(const ElectronNavigationThrottle&) =
  15. delete;
  16. // content::NavigationThrottle
  17. ElectronNavigationThrottle::ThrottleCheckResult WillStartRequest() override;
  18. ElectronNavigationThrottle::ThrottleCheckResult WillRedirectRequest()
  19. override;
  20. const char* GetNameForLogging() override;
  21. };
  22. } // namespace electron
  23. #endif // ELECTRON_SHELL_BROWSER_ELECTRON_NAVIGATION_THROTTLE_H_