electron/shell/browser/electron_preconnect_manager_delegate.h

47 lines
1.4 KiB
C
Raw Normal View History

chore: bump chromium to 140.0.7314.0 (38-x-y) (#47903) * chore: bump chromium in DEPS to 140.0.7314.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6632993: PDF Searchify IPH: Use embedder WebContents for GuestView PDF Refs https://chromium-review.googlesource.com/c/chromium/src/+/6632993 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769214: [ios blink] Set IOSurface shared memory region on all GMB handles Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769214 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769572: [soft navs]: Move AsyncSameDocumentNavigationStarted to TaskAttributionTracker Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769572 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: node gen-libc++-filenames.js Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6765740: [SxS] Implement support for split view in extensions API Refs https://chromium-review.googlesource.com/c/chromium/src/+/6765740 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-29 11:00:54 -04:00
// Copyright (c) 2025 Microsoft, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_PRECONNECT_MANAGER_DELEGATE_H_
#define ELECTRON_SHELL_BROWSER_ELECTRON_PRECONNECT_MANAGER_DELEGATE_H_
#include <memory>
#include "base/memory/weak_ptr.h"
chore: bump chromium to 140.0.7339.2 (38-x-y) (#47985) chore: bump chromium to 140.0.7339.2 (main) (#47929) * chore: bump chromium in DEPS to 140.0.7330.0 * chore: bump chromium in DEPS to 140.0.7331.0 * chore: update patches * fix: gn check failing on crashpad.h Not yet sure what caused this * fix: predictors::PreconnectManager -> content::PreconnectManager CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473 * chore: bump chromium in DEPS to 140.0.7333.0 * chore: bump chromium in DEPS to 140.0.7335.0 * chore: bump chromium in DEPS to 140.0.7337.0 * chore: update patches * chore: restore some gin utility * 6804057: [Extensions] Validate nodoc is specified as a boolean in schemas https://chromium-review.googlesource.com/c/chromium/src/+/6804057 * fixup! chore: restore some gin utility * fixup! fix: predictors::PreconnectManager -> content::PreconnectManager CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473 * 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected https://chromium-review.googlesource.com/c/chromium/src/+/6772346 Not certain about what the "correct" argument to pass here is. A quick dive into the CL suggests that passing `false` is safe to keep things working. The blast radius if this assumption is wrong is that "fling" scroll gestures may not work as expected with the OSR. * 6789383: Uninstall SODA language pack after 30 days of inactivity https://chromium-review.googlesource.com/c/chromium/src/+/6789383 * chore: update libcxx filenames * chore: bump chromium in DEPS to 140.0.7339.0 * chore: update patches * fixup! 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected https://chromium-review.googlesource.com/c/chromium/src/+/6772346 * chore: bump chromium in DEPS to 140.0.7339.2 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-08-11 14:01:08 -06:00
#include "content/public/browser/preconnect_manager.h"
chore: bump chromium to 140.0.7314.0 (38-x-y) (#47903) * chore: bump chromium in DEPS to 140.0.7314.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6632993: PDF Searchify IPH: Use embedder WebContents for GuestView PDF Refs https://chromium-review.googlesource.com/c/chromium/src/+/6632993 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769214: [ios blink] Set IOSurface shared memory region on all GMB handles Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769214 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769572: [soft navs]: Move AsyncSameDocumentNavigationStarted to TaskAttributionTracker Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769572 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: node gen-libc++-filenames.js Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6765740: [SxS] Implement support for split view in extensions API Refs https://chromium-review.googlesource.com/c/chromium/src/+/6765740 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-29 11:00:54 -04:00
class GURL;
namespace electron {
class ElectronPreconnectManagerDelegate
chore: bump chromium to 140.0.7339.2 (38-x-y) (#47985) chore: bump chromium to 140.0.7339.2 (main) (#47929) * chore: bump chromium in DEPS to 140.0.7330.0 * chore: bump chromium in DEPS to 140.0.7331.0 * chore: update patches * fix: gn check failing on crashpad.h Not yet sure what caused this * fix: predictors::PreconnectManager -> content::PreconnectManager CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473 * chore: bump chromium in DEPS to 140.0.7333.0 * chore: bump chromium in DEPS to 140.0.7335.0 * chore: bump chromium in DEPS to 140.0.7337.0 * chore: update patches * chore: restore some gin utility * 6804057: [Extensions] Validate nodoc is specified as a boolean in schemas https://chromium-review.googlesource.com/c/chromium/src/+/6804057 * fixup! chore: restore some gin utility * fixup! fix: predictors::PreconnectManager -> content::PreconnectManager CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473 * 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected https://chromium-review.googlesource.com/c/chromium/src/+/6772346 Not certain about what the "correct" argument to pass here is. A quick dive into the CL suggests that passing `false` is safe to keep things working. The blast radius if this assumption is wrong is that "fling" scroll gestures may not work as expected with the OSR. * 6789383: Uninstall SODA language pack after 30 days of inactivity https://chromium-review.googlesource.com/c/chromium/src/+/6789383 * chore: update libcxx filenames * chore: bump chromium in DEPS to 140.0.7339.0 * chore: update patches * fixup! 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected https://chromium-review.googlesource.com/c/chromium/src/+/6772346 * chore: bump chromium in DEPS to 140.0.7339.2 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-08-11 14:01:08 -06:00
: public content::PreconnectManager::Delegate {
chore: bump chromium to 140.0.7314.0 (38-x-y) (#47903) * chore: bump chromium in DEPS to 140.0.7314.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6632993: PDF Searchify IPH: Use embedder WebContents for GuestView PDF Refs https://chromium-review.googlesource.com/c/chromium/src/+/6632993 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769214: [ios blink] Set IOSurface shared memory region on all GMB handles Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769214 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769572: [soft navs]: Move AsyncSameDocumentNavigationStarted to TaskAttributionTracker Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769572 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: node gen-libc++-filenames.js Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6765740: [SxS] Implement support for split view in extensions API Refs https://chromium-review.googlesource.com/c/chromium/src/+/6765740 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-29 11:00:54 -04:00
public:
ElectronPreconnectManagerDelegate();
~ElectronPreconnectManagerDelegate() override;
// disable copy
ElectronPreconnectManagerDelegate(const ElectronPreconnectManagerDelegate&) =
delete;
ElectronPreconnectManagerDelegate& operator=(
const ElectronPreconnectManagerDelegate&) = delete;
chore: bump chromium to 140.0.7339.2 (38-x-y) (#47985) chore: bump chromium to 140.0.7339.2 (main) (#47929) * chore: bump chromium in DEPS to 140.0.7330.0 * chore: bump chromium in DEPS to 140.0.7331.0 * chore: update patches * fix: gn check failing on crashpad.h Not yet sure what caused this * fix: predictors::PreconnectManager -> content::PreconnectManager CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473 * chore: bump chromium in DEPS to 140.0.7333.0 * chore: bump chromium in DEPS to 140.0.7335.0 * chore: bump chromium in DEPS to 140.0.7337.0 * chore: update patches * chore: restore some gin utility * 6804057: [Extensions] Validate nodoc is specified as a boolean in schemas https://chromium-review.googlesource.com/c/chromium/src/+/6804057 * fixup! chore: restore some gin utility * fixup! fix: predictors::PreconnectManager -> content::PreconnectManager CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473 * 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected https://chromium-review.googlesource.com/c/chromium/src/+/6772346 Not certain about what the "correct" argument to pass here is. A quick dive into the CL suggests that passing `false` is safe to keep things working. The blast radius if this assumption is wrong is that "fling" scroll gestures may not work as expected with the OSR. * 6789383: Uninstall SODA language pack after 30 days of inactivity https://chromium-review.googlesource.com/c/chromium/src/+/6789383 * chore: update libcxx filenames * chore: bump chromium in DEPS to 140.0.7339.0 * chore: update patches * fixup! 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected https://chromium-review.googlesource.com/c/chromium/src/+/6772346 * chore: bump chromium in DEPS to 140.0.7339.2 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-08-11 14:01:08 -06:00
// content::PreconnectManager::Delegate
chore: bump chromium to 140.0.7314.0 (38-x-y) (#47903) * chore: bump chromium in DEPS to 140.0.7314.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6632993: PDF Searchify IPH: Use embedder WebContents for GuestView PDF Refs https://chromium-review.googlesource.com/c/chromium/src/+/6632993 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769214: [ios blink] Set IOSurface shared memory region on all GMB handles Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769214 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769572: [soft navs]: Move AsyncSameDocumentNavigationStarted to TaskAttributionTracker Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769572 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: node gen-libc++-filenames.js Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6765740: [SxS] Implement support for split view in extensions API Refs https://chromium-review.googlesource.com/c/chromium/src/+/6765740 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-29 11:00:54 -04:00
void PreconnectInitiated(const GURL& url,
const GURL& preconnect_url) override {}
void PreconnectFinished(
chore: bump chromium to 140.0.7339.2 (38-x-y) (#47985) chore: bump chromium to 140.0.7339.2 (main) (#47929) * chore: bump chromium in DEPS to 140.0.7330.0 * chore: bump chromium in DEPS to 140.0.7331.0 * chore: update patches * fix: gn check failing on crashpad.h Not yet sure what caused this * fix: predictors::PreconnectManager -> content::PreconnectManager CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473 * chore: bump chromium in DEPS to 140.0.7333.0 * chore: bump chromium in DEPS to 140.0.7335.0 * chore: bump chromium in DEPS to 140.0.7337.0 * chore: update patches * chore: restore some gin utility * 6804057: [Extensions] Validate nodoc is specified as a boolean in schemas https://chromium-review.googlesource.com/c/chromium/src/+/6804057 * fixup! chore: restore some gin utility * fixup! fix: predictors::PreconnectManager -> content::PreconnectManager CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473 * 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected https://chromium-review.googlesource.com/c/chromium/src/+/6772346 Not certain about what the "correct" argument to pass here is. A quick dive into the CL suggests that passing `false` is safe to keep things working. The blast radius if this assumption is wrong is that "fling" scroll gestures may not work as expected with the OSR. * 6789383: Uninstall SODA language pack after 30 days of inactivity https://chromium-review.googlesource.com/c/chromium/src/+/6789383 * chore: update libcxx filenames * chore: bump chromium in DEPS to 140.0.7339.0 * chore: update patches * fixup! 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected https://chromium-review.googlesource.com/c/chromium/src/+/6772346 * chore: bump chromium in DEPS to 140.0.7339.2 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-08-11 14:01:08 -06:00
std::unique_ptr<content::PreconnectStats> stats) override {}
chore: bump chromium to 140.0.7314.0 (38-x-y) (#47903) * chore: bump chromium in DEPS to 140.0.7314.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6632993: PDF Searchify IPH: Use embedder WebContents for GuestView PDF Refs https://chromium-review.googlesource.com/c/chromium/src/+/6632993 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769214: [ios blink] Set IOSurface shared memory region on all GMB handles Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769214 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769572: [soft navs]: Move AsyncSameDocumentNavigationStarted to TaskAttributionTracker Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769572 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: node gen-libc++-filenames.js Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6765740: [SxS] Implement support for split view in extensions API Refs https://chromium-review.googlesource.com/c/chromium/src/+/6765740 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-29 11:00:54 -04:00
bool IsPreconnectEnabled() override;
base::WeakPtr<ElectronPreconnectManagerDelegate> GetWeakPtr() {
return weak_factory_.GetWeakPtr();
}
private:
base::WeakPtrFactory<ElectronPreconnectManagerDelegate> weak_factory_{this};
};
} // namespace electron
#endif // ELECTRON_SHELL_BROWSER_ELECTRON_PRECONNECT_MANAGER_DELEGATE_H_