Chromium Code Reviews| Index: chrome/browser/plugins/flash_download_interception.h |
| diff --git a/chrome/browser/plugins/flash_download_interception.h b/chrome/browser/plugins/flash_download_interception.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6e88c1f5b74d00326a1a6ae67cd81aad80584bf0 |
| --- /dev/null |
| +++ b/chrome/browser/plugins/flash_download_interception.h |
| @@ -0,0 +1,30 @@ |
| +// 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 CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ |
| +#define CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/macros.h" |
| +#include "content/public/browser/navigation_throttle.h" |
| + |
| +namespace content { |
| +class NavigationHandle; |
| +class NavigationThrottle; |
|
Lei Zhang
2016/08/25 00:55:07
Either this is not needed, or the navigation_throt
trizzofo
2016/08/25 01:50:36
Done.
|
| +} |
| + |
| +// This class creates navigation throttles that intercept navigations to Flash's |
| +// download page. The user is queried about activating Flash instead, since |
| +// Chrome already ships with it. Note that this is an UI thread class. |
| +class FlashDownloadInterception { |
| + public: |
| + static std::unique_ptr<content::NavigationThrottle> MaybeCreateThrottleFor( |
|
Lei Zhang
2016/08/25 00:55:07
Would unit tests be useful?
trizzofo
2016/08/25 01:50:36
Apparently, AppUrlRedirector (similar class) is te
trizzofo
2016/08/25 20:46:52
Since this CL is blocking some UI work (permission
|
| + content::NavigationHandle* handle); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(FlashDownloadInterception); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ |