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 class WebContents; | 15 class WebContents; |
16 } | 16 } |
17 | 17 |
18 class HostContentSettingsMap; | 18 class HostContentSettingsMap; |
19 class GURL; | 19 class GURL; |
20 | 20 |
21 // This class creates navigation throttles that intercept navigations to Flash's | 21 // This class creates navigation throttles that intercept navigations to Flash's |
22 // download page. The user is queried about activating Flash instead, since | 22 // download page. The user is queried about activating Flash instead, since |
23 // Chrome already ships with it. Note that this is an UI thread class. | 23 // Chrome already ships with it. Note that this is an UI thread class. |
24 class FlashDownloadInterception { | 24 class FlashDownloadInterception { |
25 public: | 25 public: |
26 static void InterceptFlashDownloadNavigation(content::WebContents* source); | 26 static void ShowRunFlashPrompt(content::WebContents* web_contents); |
27 static bool ShouldStopFlashDownloadAction( | 27 static bool ShouldStopFlashDownloadAction( |
28 HostContentSettingsMap* host_content_settings_map, | 28 HostContentSettingsMap* host_content_settings_map, |
29 const GURL& source_url, | 29 const GURL& source_url, |
30 const GURL& target_url, | 30 const GURL& target_url, |
31 bool has_user_gesture); | 31 bool has_user_gesture); |
32 | 32 |
33 static std::unique_ptr<content::NavigationThrottle> MaybeCreateThrottleFor( | 33 static std::unique_ptr<content::NavigationThrottle> MaybeCreateThrottleFor( |
34 content::NavigationHandle* handle); | 34 content::NavigationHandle* handle); |
35 | 35 |
36 private: | 36 private: |
37 DISALLOW_COPY_AND_ASSIGN(FlashDownloadInterception); | 37 DISALLOW_COPY_AND_ASSIGN(FlashDownloadInterception); |
38 }; | 38 }; |
39 | 39 |
40 #endif // CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ | 40 #endif // CHROME_BROWSER_PLUGINS_FLASH_DOWNLOAD_INTERCEPTION_H_ |
OLD | NEW |