Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: extensions/browser/api/web_request/web_request_event_router_delegate.h

Issue 568583002: Introduce WebRequestEventRouterDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes are made. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/web_request/web_request_event_router_delegate.h
diff --git a/extensions/browser/api/web_request/web_request_event_router_delegate.h b/extensions/browser/api/web_request/web_request_event_router_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..7feacc15a132ac2bff1834a1652f193316d4eafc
--- /dev/null
+++ b/extensions/browser/api/web_request/web_request_event_router_delegate.h
@@ -0,0 +1,58 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// 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_ROUTER_DELEGATE_H_
+#define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_
+
+#include <string>
+
+#include "base/values.h"
+
+class GURL;
+
+namespace base {
+class DictionaryValue;
+} // namspace base
+
+namespace net {
+class URLRequest;
+} // namspace net
+
+namespace extension_web_request_api_helpers {
+struct EventResponseDelta;
+} // extension_web_request_api_helpers
+
+namespace extensions {
+
+// A delegate class of WebRequestApi that are not a part of chrome.
+class WebRequestEventRouterDelegate {
+ public:
+ WebRequestEventRouterDelegate();
+ virtual ~WebRequestEventRouterDelegate();
+
+ // Looks up the tab and window ID for a given request.
+ // Called on the IO thread.
+ virtual void ExtractExtraRequestDetails(
+ net::URLRequest* request, base::DictionaryValue* out) = 0;
+
+ // Called to check extra parameters (e.g., tab_id, windown_id) when filtering
+ // event listeners.
+ virtual bool OnGetMachingListernersImplCheck(
Ken Rockot(use gerrit already) 2014/09/19 23:08:34 Sorry I missed this the first time, but this has a
Xi Han 2014/09/22 14:34:15 Sorry for the misspellings, corrected them. On 2
+ int tab_id, int window_id, net::URLRequest* request);
+
+ // Logs an extension action.
+ virtual void LogExtensionActivity(
+ void* browser_context_id,
+ bool is_incognito,
+ const std::string& extension_id,
+ const GURL& url,
+ const std::string& api_calli,
+ const extension_web_request_api_helpers::EventResponseDelta& delta) = 0;
+
+ DISALLOW_COPY_AND_ASSIGN(WebRequestEventRouterDelegate);
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698