Index: chrome/browser/permissions/permission_manager.cc |
diff --git a/chrome/browser/permissions/permission_manager.cc b/chrome/browser/permissions/permission_manager.cc |
index bed2a61d7364ea0cbc3ff26275c73e31d4b4447d..86f5dc5e25d5f06e6f870574c53d24dd94aebfb4 100644 |
--- a/chrome/browser/permissions/permission_manager.cc |
+++ b/chrome/browser/permissions/permission_manager.cc |
@@ -31,8 +31,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 |
@@ -282,6 +287,13 @@ int PermissionManager::RequestPermissions( |
content::WebContents* web_contents = |
content::WebContents::FromRenderFrameHost(render_frame_host); |
+ |
+#if BUILDFLAG(ENABLE_VR) |
+ if (vr_shell::VrTabHelper::IsInVr(web_contents)) { |
raymes
2017/05/31 23:10:07
This is missing:
callback.Run(std::vector<Content
asimjour1
2017/06/06 17:58:56
Done.
|
+ return kNoPendingOperation; |
+ } |
+#endif // BUILDFLAG(ENABLE_VR) |
+ |
GURL embedding_origin = web_contents->GetLastCommittedURL().GetOrigin(); |
int request_id = pending_requests_.Add(base::MakeUnique<PendingRequest>( |