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

Unified Diff: chrome/browser/permissions/permission_manager.cc

Issue 2975593002: [vr] Deny permission requests in VR mode
Patch Set: . Created 3 years, 5 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
Index: chrome/browser/permissions/permission_manager.cc
diff --git a/chrome/browser/permissions/permission_manager.cc b/chrome/browser/permissions/permission_manager.cc
index f28500639bb6323abc9dcf1d8b973a8ec811887d..bc068fc197fd3efacf50652d8bc8dbabe86966dd 100644
--- a/chrome/browser/permissions/permission_manager.cc
+++ b/chrome/browser/permissions/permission_manager.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/storage/durable_storage_permission_context.h"
#include "chrome/browser/tab_contents/tab_util.h"
+#include "chrome/browser/vr/vr_tab_helper.h"
#include "chrome/common/features.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "content/public/browser/browser_thread.h"
@@ -34,10 +35,6 @@
#include "device/vr/features/features.h"
#include "ppapi/features/features.h"
-#if BUILDFLAG(ENABLE_VR) && defined(OS_ANDROID)
-#include "chrome/browser/android/vr_shell/vr_tab_helper.h"
-#endif // BUILDFLAG(ENABLE_VR) && defined(OS_ANDROID)
-
#if BUILDFLAG(ENABLE_PLUGINS)
#include "chrome/browser/plugins/flash_permission_context.h"
#endif
@@ -329,13 +326,11 @@ int PermissionManager::RequestPermissions(
content::WebContents* web_contents =
content::WebContents::FromRenderFrameHost(render_frame_host);
-#if BUILDFLAG(ENABLE_VR) && defined(OS_ANDROID)
- if (vr_shell::VrTabHelper::IsInVr(web_contents)) {
+ if (vr::VrTabHelper::IsInVr(web_contents)) {
callback.Run(
std::vector<ContentSetting>(permissions.size(), CONTENT_SETTING_BLOCK));
return kNoPendingOperation;
}
-#endif // BUILDFLAG(ENABLE_VR) && defined(OS_ANDROID)
GURL embedding_origin = web_contents->GetLastCommittedURL().GetOrigin();

Powered by Google App Engine
This is Rietveld 408576698