Commit e0519ce7 authored by Biao She's avatar Biao She Committed by Commit Bot

Enable multiple download permission popup in VR(behind flag)


Bug: 819885
Change-Id: I6c93d4fb98a6804797f434e87f75c3a991d27607
Reviewed-on: https://chromium-review.googlesource.com/956690Reviewed-by: default avatarAmirhossein Simjour <asimjour@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Biao She <bshe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543129}
parent 39323538
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "base/android/jni_android.h" #include "base/android/jni_android.h"
#include "base/android/jni_string.h" #include "base/android/jni_string.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/feature_list.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/metrics/field_trial_params.h" #include "base/metrics/field_trial_params.h"
...@@ -260,7 +261,9 @@ void DownloadController::AcquireFileAccessPermission( ...@@ -260,7 +261,9 @@ void DownloadController::AcquireFileAccessPermission(
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
WebContents* web_contents = web_contents_getter.Run(); WebContents* web_contents = web_contents_getter.Run();
if (vr::VrTabHelper::IsInVr(web_contents)) { if (vr::VrTabHelper::IsInVr(web_contents) &&
!base::FeatureList::IsEnabled(
chrome::android::kVrBrowsingNativeAndroidUi)) {
vr::VrTabHelper::UISuppressed( vr::VrTabHelper::UISuppressed(
vr::UiSuppressedElement::kFileAccessPermission); vr::UiSuppressedElement::kFileAccessPermission);
return; return;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/download/download_permission_request.h" #include "chrome/browser/download/download_permission_request.h"
...@@ -27,6 +28,11 @@ ...@@ -27,6 +28,11 @@
#include "content/public/browser/web_contents_delegate.h" #include "content/public/browser/web_contents_delegate.h"
#include "url/gurl.h" #include "url/gurl.h"
#if defined(OS_ANDROID)
#include "base/feature_list.h"
#include "chrome/browser/android/chrome_feature_list.h"
#endif
using content::BrowserThread; using content::BrowserThread;
using content::NavigationController; using content::NavigationController;
using content::NavigationEntry; using content::NavigationEntry;
...@@ -223,7 +229,13 @@ void DownloadRequestLimiter::TabDownloadState::PromptUserForDownload( ...@@ -223,7 +229,13 @@ void DownloadRequestLimiter::TabDownloadState::PromptUserForDownload(
if (is_showing_prompt()) if (is_showing_prompt())
return; return;
#if defined(OS_ANDROID)
if (vr::VrTabHelper::IsInVr(web_contents_) &&
!base::FeatureList::IsEnabled(
chrome::android::kVrBrowsingNativeAndroidUi)) {
#else
if (vr::VrTabHelper::IsInVr(web_contents_)) { if (vr::VrTabHelper::IsInVr(web_contents_)) {
#endif
vr::VrTabHelper::UISuppressed(vr::UiSuppressedElement::kDownloadPermission); vr::VrTabHelper::UISuppressed(vr::UiSuppressedElement::kDownloadPermission);
// Permission request UI cannot currently be rendered binocularly in VR // Permission request UI cannot currently be rendered binocularly in VR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment