| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ | 5 #ifndef CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ |
| 6 #define CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ | 6 #define CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 class NavigationHandle; | 13 class NavigationHandle; |
| 14 class NavigationThrottle; | 14 class NavigationThrottle; |
| 15 } | 15 } |
| 16 | 16 |
| 17 class HostContentSettingsMap; |
| 18 class GURL; |
| 19 |
| 17 // This class creates navigation throttles that intercept navigations to Flash's | 20 // This class creates navigation throttles that intercept navigations to Flash's |
| 18 // download page. The user is queried about activating Flash instead, since | 21 // download page. The user is queried about activating Flash instead, since |
| 19 // Chrome already ships with it. Note that this is an UI thread class. | 22 // Chrome already ships with it. Note that this is an UI thread class. |
| 20 class FlashDownloadInterception { | 23 class FlashDownloadInterception { |
| 21 public: | 24 public: |
| 25 static bool ShouldStopFlashDownloadAction( |
| 26 HostContentSettingsMap* host_content_settings_map, |
| 27 const GURL& source_url, |
| 28 const GURL& target_url, |
| 29 bool has_user_gesture); |
| 30 |
| 22 static std::unique_ptr<content::NavigationThrottle> MaybeCreateThrottleFor( | 31 static std::unique_ptr<content::NavigationThrottle> MaybeCreateThrottleFor( |
| 23 content::NavigationHandle* handle); | 32 content::NavigationHandle* handle); |
| 24 | 33 |
| 25 private: | 34 private: |
| 26 DISALLOW_COPY_AND_ASSIGN(FlashDownloadInterception); | 35 DISALLOW_COPY_AND_ASSIGN(FlashDownloadInterception); |
| 27 }; | 36 }; |
| 28 | 37 |
| 29 #endif // CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ | 38 #endif // CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ |
| OLD | NEW |