Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | |
|
nasko
2017/01/23 22:32:38
nit: No "(c)" needed.
carlosk
2017/02/08 02:59:02
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_MIXED_CONTENT_SETTINGS_TAB_HELPER_H_ | |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_MIXED_CONTENT_SETTINGS_TAB_HELPER_H_ | |
| 7 | |
| 8 #include "content/public/browser/web_contents_observer.h" | |
| 9 #include "content/public/browser/web_contents_user_data.h" | |
| 10 | |
| 11 namespace content { | |
| 12 class SiteInstance; | |
| 13 } | |
| 14 | |
| 15 // Controls mixed content related settings for the associated, working as the | |
|
nasko
2017/01/23 22:32:38
nit: associated what?
carlosk
2017/02/08 02:59:03
Done.
| |
| 16 // browser version of the mixed content state kept by ContentSettingsObserver in | |
| 17 // the renderer. | |
| 18 class MixedContentSettingsTabHelper | |
| 19 : public content::WebContentsObserver, | |
| 20 public content::WebContentsUserData<MixedContentSettingsTabHelper> { | |
| 21 public: | |
| 22 ~MixedContentSettingsTabHelper() override; | |
| 23 | |
| 24 // Enables running active mixed content resources in the associated | |
| 25 // WebContents/tab. | |
| 26 void AllowRunningOfInsecureContent(); | |
| 27 | |
| 28 bool is_running_insecure_content_allowed() { | |
| 29 return is_running_insecure_content_allowed_; | |
| 30 } | |
| 31 | |
| 32 private: | |
| 33 friend class content::WebContentsUserData<MixedContentSettingsTabHelper>; | |
| 34 | |
| 35 explicit MixedContentSettingsTabHelper(content::WebContents* tab); | |
| 36 | |
| 37 void DidFinishNavigation( | |
| 38 content::NavigationHandle* navigation_handle) override; | |
| 39 | |
| 40 // Members to control mixed content settings for the tab. They will be reset | |
| 41 // on cross-site main frame navigations. | |
| 42 content::SiteInstance* insecure_content_site_instance_ = nullptr; | |
| 43 bool is_running_insecure_content_allowed_ = false; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(MixedContentSettingsTabHelper); | |
| 46 }; | |
| 47 | |
| 48 #endif // CHROME_BROWSER_CONTENT_SETTINGS_MIXED_CONTENT_SETTINGS_TAB_HELPER_H_ | |
| OLD | NEW |