// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_DETAILS_H_ #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_DETAILS_H_ #include <memory> #include <optional> #include <string> #include "base/values.h" #include "extensions/browser/extension_api_frame_id_map.h" #include "extensions/common/extension_id.h" #include "url/origin.h" namespace net { class AuthChallengeInfo; class HttpRequestHeaders; class HttpResponseHeaders; } // namespace net namespace extensions { class PermissionHelper; struct WebRequestInfo; // This helper class is used to construct the details for a webRequest event // dictionary. Some keys are present on every event, others are only relevant // for a few events. And some keys must only be added to the event details if // requested at the registration of the event listener (in ExtraInfoSpec). // This class provides setters that are aware of these rules. // // Not all keys are managed by this class. Keys that do not require a special // treatment can be set using the generic SetBoolean / SetInteger / SetString // methods (e.g. to set "error", "message", "redirectUrl", "stage" or "tabId"). // // This class should be constructed on the IO thread. It can safely be used on // other threads, as long as there is no concurrent access. class WebRequestEventDetails { … }; } // namespace extensions #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_DETAILS_H_