chore: tune-up electron::api::NetLog (#29534)
This commit is contained in:
parent
aca14bf7dd
commit
8844034fa8
2 changed files with 16 additions and 5 deletions
|
@ -6,9 +6,14 @@
|
|||
#define SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/values.h"
|
||||
#include "gin/handle.h"
|
||||
#include "gin/wrappable.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "net/log/net_log_capture_mode.h"
|
||||
#include "services/network/public/mojom/net_log.mojom.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
|
@ -23,6 +28,7 @@ class ElectronBrowserContext;
|
|||
|
||||
namespace api {
|
||||
|
||||
// The code is referenced from the net_log::NetExportFileWriter class.
|
||||
class NetLog : public gin::Wrappable<NetLog> {
|
||||
public:
|
||||
static gin::Handle<NetLog> Create(v8::Isolate* isolate,
|
||||
|
@ -55,7 +61,7 @@ class NetLog : public gin::Wrappable<NetLog> {
|
|||
private:
|
||||
ElectronBrowserContext* browser_context_;
|
||||
|
||||
network::mojom::NetLogExporterPtr net_log_exporter_;
|
||||
mojo::Remote<network::mojom::NetLogExporter> net_log_exporter_;
|
||||
|
||||
absl::optional<gin_helper::Promise<void>> pending_start_promise_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue