| Index: chrome/browser/permissions/permission_manager.cc
|
| diff --git a/chrome/browser/permissions/permission_manager.cc b/chrome/browser/permissions/permission_manager.cc
|
| index fc6917410fa8b7b57dda8401eea58a1e6ec818a7..2a1554d00a0566ee2837080b63a84bfe593dba7d 100644
|
| --- a/chrome/browser/permissions/permission_manager.cc
|
| +++ b/chrome/browser/permissions/permission_manager.cc
|
| @@ -30,8 +30,13 @@
|
| #include "content/public/browser/render_frame_host.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| +#include "device/vr/features/features.h"
|
| #include "ppapi/features/features.h"
|
|
|
| +#if BUILDFLAG(ENABLE_VR)
|
| +#include "chrome/browser/android/vr_shell/vr_tab_helper.h"
|
| +#endif // BUILDFLAG(ENABLE_VR)
|
| +
|
| #if BUILDFLAG(ENABLE_PLUGINS)
|
| #include "chrome/browser/plugins/flash_permission_context.h"
|
| #endif
|
| @@ -303,6 +308,15 @@ int PermissionManager::RequestPermissions(
|
|
|
| content::WebContents* web_contents =
|
| content::WebContents::FromRenderFrameHost(render_frame_host);
|
| +
|
| +#if BUILDFLAG(ENABLE_VR)
|
| + if (vr_shell::VrTabHelper::IsInVr(web_contents)) {
|
| + callback.Run(
|
| + std::vector<ContentSetting>(permissions.size(), CONTENT_SETTING_BLOCK));
|
| + return kNoPendingOperation;
|
| + }
|
| +#endif // BUILDFLAG(ENABLE_VR)
|
| +
|
| GURL embedding_origin = web_contents->GetLastCommittedURL().GetOrigin();
|
|
|
| int request_id = pending_requests_.Add(base::MakeUnique<PendingRequest>(
|
|
|