#include "chrome/browser/extensions/api/declarative_webrequest/request_stage.h"
#include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h"
#include "chrome/browser/extensions/api/web_request/web_request_permissions.h"
+#include "content/public/common/resource_type.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function.h"
#include "net/base/completion_callback.h"
#include "net/base/network_delegate.h"
#include "net/http/http_request_headers.h"
-#include "webkit/common/resource_type.h"
class ExtensionWebRequestTimeTracker;
class GURL;
// Support class for the WebRequest API. Lives on the UI thread. Most of the
// work is done by ExtensionWebRequestEventRouter below. This class observes
-// extension::EventRouter to deal with event listeners. There is one instance
+// extensions::EventRouter to deal with event listeners. There is one instance
// per BrowserContext which is shared with incognito.
class WebRequestAPI : public BrowserContextKeyedAPI,
public EventRouter::Observer {
bool InitFromValue(const base::DictionaryValue& value, std::string* error);
extensions::URLPatternSet urls;
- std::vector<ResourceType::Type> types;
+ std::vector<content::ResourceType> types;
int tab_id;
int window_id;
};
int window_id,
int render_process_host_id,
int routing_id,
- ResourceType::Type resource_type,
+ content::ResourceType resource_type,
bool is_async_request,
bool is_request_from_extension,
int* extra_info_spec,
DISALLOW_COPY_AND_ASSIGN(ExtensionWebRequestEventRouter);
};
-class WebRequestAddEventListener : public SyncIOThreadExtensionFunction {
+class WebRequestInternalAddEventListenerFunction
+ : public SyncIOThreadExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webRequestInternal.addEventListener",
WEBREQUESTINTERNAL_ADDEVENTLISTENER)
protected:
- virtual ~WebRequestAddEventListener() {}
+ virtual ~WebRequestInternalAddEventListenerFunction() {}
// ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
+ virtual bool RunSync() OVERRIDE;
};
-class WebRequestEventHandled : public SyncIOThreadExtensionFunction {
+class WebRequestInternalEventHandledFunction
+ : public SyncIOThreadExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webRequestInternal.eventHandled",
WEBREQUESTINTERNAL_EVENTHANDLED)
protected:
- virtual ~WebRequestEventHandled() {}
+ virtual ~WebRequestInternalEventHandledFunction() {}
// Unblocks the network request and sets |error_| such that the developer
// console will show the respective error message. Use this function to handle
const std::string& error);
// ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
+ virtual bool RunSync() OVERRIDE;
};
class WebRequestHandlerBehaviorChangedFunction
// Handle quota exceeded gracefully: Only warn the user but still execute the
// function.
virtual void OnQuotaExceeded(const std::string& error) OVERRIDE;
- virtual bool RunImpl() OVERRIDE;
+ virtual bool RunSync() OVERRIDE;
};
// Send updates to |host| with information about what webRequest-related
// extensions are installed.
-// TODO(mpcomplete): remove. http://crbug.com/100411
void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host);
#endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_