Chromium Code Reviews| Index: extensions/browser/extension_navigation_throttle.h |
| diff --git a/extensions/browser/extension_navigation_throttle.h b/extensions/browser/extension_navigation_throttle.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6e3c97aacc3e0749edd3d1765fc2c7fa08bc3cef |
| --- /dev/null |
| +++ b/extensions/browser/extension_navigation_throttle.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2016 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_EXTENSION_NAVIGATION_THROTTLE_H_ |
| +#define EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_THROTTLE_H_ |
| + |
| +#include <string> |
|
Devlin
2016/06/03 22:22:46
not needed
nasko
2016/06/06 17:40:44
Done.
|
| + |
| +#include "base/callback.h" |
|
Devlin
2016/06/03 22:22:46
IWYU nit: base/macros.h
nasko
2016/06/06 17:40:44
Done.
|
| +#include "content/public/browser/navigation_throttle.h" |
| + |
| +namespace content { |
| +class NavigationHandle; |
| +} |
| + |
| +namespace extensions { |
| + |
| +class NavigationParams; |
| + |
| +// This class allows the extensions subsystem to have control over navigations |
| +// and optionally cancel/block them. This is a UI thread class. |
| +class ExtensionNavigationThrottle : public content::NavigationThrottle { |
| + public: |
| + ExtensionNavigationThrottle(content::NavigationHandle* navigation_handle); |
|
Devlin
2016/06/03 22:22:45
explicit
nasko
2016/06/06 17:40:44
Done.
|
| + ~ExtensionNavigationThrottle() override; |
| + |
| + // content::NavigationThrottle implementation: |
| + ThrottleCheckResult WillStartRequest() override; |
|
Devlin
2016/06/03 22:22:45
I'm not very familiar with NavigationThrottle, so
nasko
2016/06/06 17:40:44
This will be called before the request is sent to
Devlin
2016/06/06 22:17:22
I'm a little worried that this will become (more)
nasko
2016/06/06 23:23:03
I think the cleaner model will be once we ship Plz
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(ExtensionNavigationThrottle); |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_THROTTLE_H_ |