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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2394653002: Disable download for overlay panel content (Closed)
Patch Set: rebase Created 4 years, 1 month 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 force_disable_overscroll_content_(false), 444 force_disable_overscroll_content_(false),
445 last_dialog_suppressed_(false), 445 last_dialog_suppressed_(false),
446 geolocation_service_context_(new device::GeolocationServiceContext()), 446 geolocation_service_context_(new device::GeolocationServiceContext()),
447 accessibility_mode_( 447 accessibility_mode_(
448 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), 448 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()),
449 audio_stream_monitor_(this), 449 audio_stream_monitor_(this),
450 bluetooth_connected_device_count_(0), 450 bluetooth_connected_device_count_(0),
451 virtual_keyboard_requested_(false), 451 virtual_keyboard_requested_(false),
452 page_scale_factor_is_one_(true), 452 page_scale_factor_is_one_(true),
453 mouse_lock_widget_(nullptr), 453 mouse_lock_widget_(nullptr),
454 is_overlay_content_(false),
454 loading_weak_factory_(this), 455 loading_weak_factory_(this),
455 weak_factory_(this) { 456 weak_factory_(this) {
456 frame_tree_.SetFrameRemoveListener( 457 frame_tree_.SetFrameRemoveListener(
457 base::Bind(&WebContentsImpl::OnFrameRemoved, 458 base::Bind(&WebContentsImpl::OnFrameRemoved,
458 base::Unretained(this))); 459 base::Unretained(this)));
459 #if defined(OS_ANDROID) 460 #if defined(OS_ANDROID)
460 media_web_contents_observer_.reset(new MediaWebContentsObserverAndroid(this)); 461 media_web_contents_observer_.reset(new MediaWebContentsObserverAndroid(this));
461 #else 462 #else
462 media_web_contents_observer_.reset(new MediaWebContentsObserver(this)); 463 media_web_contents_observer_.reset(new MediaWebContentsObserver(this));
463 #endif 464 #endif
(...skipping 3342 matching lines...) Expand 10 before | Expand all | Expand 10 after
3806 } 3807 }
3807 3808
3808 void WebContentsImpl::OnPasswordInputShownOnHttp() { 3809 void WebContentsImpl::OnPasswordInputShownOnHttp() {
3809 controller_.ssl_manager()->DidShowPasswordInputOnHttp(); 3810 controller_.ssl_manager()->DidShowPasswordInputOnHttp();
3810 } 3811 }
3811 3812
3812 void WebContentsImpl::OnCreditCardInputShownOnHttp() { 3813 void WebContentsImpl::OnCreditCardInputShownOnHttp() {
3813 controller_.ssl_manager()->DidShowCreditCardInputOnHttp(); 3814 controller_.ssl_manager()->DidShowCreditCardInputOnHttp();
3814 } 3815 }
3815 3816
3817 void WebContentsImpl::SetIsOverlayContent(bool is_overlay_content) {
3818 is_overlay_content_ = is_overlay_content;
3819 }
3820
3816 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() { 3821 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() {
3817 for (auto& observer : observers_) 3822 for (auto& observer : observers_)
3818 observer.DidFirstVisuallyNonEmptyPaint(); 3823 observer.DidFirstVisuallyNonEmptyPaint();
3819 3824
3820 did_first_visually_non_empty_paint_ = true; 3825 did_first_visually_non_empty_paint_ = true;
3821 3826
3822 if (theme_color_ != last_sent_theme_color_) { 3827 if (theme_color_ != last_sent_theme_color_) {
3823 // Theme color should have updated by now if there was one. 3828 // Theme color should have updated by now if there was one.
3824 for (auto& observer : observers_) 3829 for (auto& observer : observers_)
3825 observer.DidChangeThemeColor(theme_color_); 3830 observer.DidChangeThemeColor(theme_color_);
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
4138 double WebContentsImpl::GetPendingPageZoomLevel() { 4143 double WebContentsImpl::GetPendingPageZoomLevel() {
4139 NavigationEntry* pending_entry = GetController().GetPendingEntry(); 4144 NavigationEntry* pending_entry = GetController().GetPendingEntry();
4140 if (!pending_entry) 4145 if (!pending_entry)
4141 return HostZoomMap::GetZoomLevel(this); 4146 return HostZoomMap::GetZoomLevel(this);
4142 4147
4143 GURL url = pending_entry->GetURL(); 4148 GURL url = pending_entry->GetURL();
4144 return HostZoomMap::GetForWebContents(this)->GetZoomLevelForHostAndScheme( 4149 return HostZoomMap::GetForWebContents(this)->GetZoomLevelForHostAndScheme(
4145 url.scheme(), net::GetHostOrSpecFromURL(url)); 4150 url.scheme(), net::GetHostOrSpecFromURL(url));
4146 } 4151 }
4147 4152
4153 bool WebContentsImpl::HideDownloadUI() const {
4154 return is_overlay_content_;
4155 }
4156
4148 bool WebContentsImpl::IsNeverVisible() { 4157 bool WebContentsImpl::IsNeverVisible() {
4149 if (!delegate_) 4158 if (!delegate_)
4150 return false; 4159 return false;
4151 return delegate_->IsNeverVisible(this); 4160 return delegate_->IsNeverVisible(this);
4152 } 4161 }
4153 4162
4154 RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() { 4163 RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() {
4155 return render_view_host_delegate_view_; 4164 return render_view_host_delegate_view_;
4156 } 4165 }
4157 4166
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
5188 dialog_manager_ = dialog_manager; 5197 dialog_manager_ = dialog_manager;
5189 } 5198 }
5190 5199
5191 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5200 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5192 auto it = binding_sets_.find(interface_name); 5201 auto it = binding_sets_.find(interface_name);
5193 if (it != binding_sets_.end()) 5202 if (it != binding_sets_.end())
5194 binding_sets_.erase(it); 5203 binding_sets_.erase(it);
5195 } 5204 }
5196 5205
5197 } // namespace content 5206 } // namespace content
OLDNEW
« 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