Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(796)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2394653002: Disable download for overlay panel content (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 8fafdaeb59cce21eb0bde46d2e6f87fbeb6b1e2d..a538990590638b127b653f349d4c57a039463b38 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -451,6 +451,7 @@ WebContentsImpl::WebContentsImpl(BrowserContext* browser_context)
virtual_keyboard_requested_(false),
page_scale_factor_is_one_(true),
mouse_lock_widget_(nullptr),
+ is_overlay_content_(false),
loading_weak_factory_(this),
weak_factory_(this) {
frame_tree_.SetFrameRemoveListener(
@@ -3813,6 +3814,10 @@ void WebContentsImpl::OnCreditCardInputShownOnHttp() {
controller_.ssl_manager()->DidShowCreditCardInputOnHttp();
}
+void WebContentsImpl::SetIsOverlayContent(bool is_overlay_content) {
+ is_overlay_content_ = is_overlay_content;
+}
+
void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() {
for (auto& observer : observers_)
observer.DidFirstVisuallyNonEmptyPaint();
@@ -4145,6 +4150,10 @@ double WebContentsImpl::GetPendingPageZoomLevel() {
url.scheme(), net::GetHostOrSpecFromURL(url));
}
+bool WebContentsImpl::HideDownloadUI() const {
+ return is_overlay_content_;
+}
+
bool WebContentsImpl::IsNeverVisible() {
if (!delegate_)
return false;
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698