| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2008 frameRequest.setReplacesCurrentItem(replace); | 2008 frameRequest.setReplacesCurrentItem(replace); |
| 2009 if (isClientRedirect) | 2009 if (isClientRedirect) |
| 2010 frameRequest.setClientRedirect(ClientRedirectPolicy::ClientRedirect); | 2010 frameRequest.setClientRedirect(ClientRedirectPolicy::ClientRedirect); |
| 2011 | 2011 |
| 2012 HistoryItem* historyItem = item; | 2012 HistoryItem* historyItem = item; |
| 2013 frame()->loader().load( | 2013 frame()->loader().load( |
| 2014 frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem, | 2014 frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem, |
| 2015 static_cast<HistoryLoadType>(webHistoryLoadType)); | 2015 static_cast<HistoryLoadType>(webHistoryLoadType)); |
| 2016 } | 2016 } |
| 2017 | 2017 |
| 2018 void WebLocalFrameImpl::mixedContentUpdateFromBrowser( |
| 2019 const std::set<int>& features, |
| 2020 bool mixedContentWasFound, |
| 2021 const WebURL& mixedContentUrl, |
| 2022 bool mixedContentHadRedirect) { |
| 2023 // Assimilate all features detected during mixed content checks in the |
| 2024 // browser. |
| 2025 DCHECK(!features.empty() || mixedContentWasFound); |
| 2026 for (int feature : features) { |
| 2027 UseCounter::count(frame(), static_cast<UseCounter::Feature>(feature)); |
| 2028 } |
| 2029 |
| 2030 // Report found mixed content to the CSP policy. |
| 2031 if (mixedContentWasFound) { |
| 2032 ContentSecurityPolicy* policy = |
| 2033 frame()->securityContext()->contentSecurityPolicy(); |
| 2034 if (policy) { |
| 2035 policy->reportMixedContent( |
| 2036 mixedContentUrl, |
| 2037 mixedContentHadRedirect |
| 2038 ? ResourceRequest::RedirectStatus::FollowedRedirect |
| 2039 : ResourceRequest::RedirectStatus::NoRedirect); |
| 2040 } |
| 2041 } |
| 2042 } |
| 2043 |
| 2018 bool WebLocalFrameImpl::maybeRenderFallbackContent( | 2044 bool WebLocalFrameImpl::maybeRenderFallbackContent( |
| 2019 const WebURLError& error) const { | 2045 const WebURLError& error) const { |
| 2020 DCHECK(frame()); | 2046 DCHECK(frame()); |
| 2021 | 2047 |
| 2022 if (!frame()->owner() || !frame()->owner()->canRenderFallbackContent()) | 2048 if (!frame()->owner() || !frame()->owner()->canRenderFallbackContent()) |
| 2023 return false; | 2049 return false; |
| 2024 | 2050 |
| 2025 FrameLoader& frameloader = frame()->loader(); | 2051 FrameLoader& frameloader = frame()->loader(); |
| 2026 frameloader.loadFailed(frameloader.documentLoader(), error); | 2052 frameloader.loadFailed(frameloader.documentLoader(), error); |
| 2027 return true; | 2053 return true; |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2361 ->frameScheduler() | 2387 ->frameScheduler() |
| 2362 ->unthrottledTaskRunner() | 2388 ->unthrottledTaskRunner() |
| 2363 ->toSingleThreadTaskRunner(); | 2389 ->toSingleThreadTaskRunner(); |
| 2364 } | 2390 } |
| 2365 | 2391 |
| 2366 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { | 2392 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { |
| 2367 return m_inputMethodController.get(); | 2393 return m_inputMethodController.get(); |
| 2368 } | 2394 } |
| 2369 | 2395 |
| 2370 } // namespace blink | 2396 } // namespace blink |
| OLD | NEW |