Chromium Code Reviews| Index: chrome/browser/extensions/webstore_inline_installer.cc |
| diff --git a/chrome/browser/extensions/webstore_inline_installer.cc b/chrome/browser/extensions/webstore_inline_installer.cc |
| index 86a7848dff72637d7f3730ce8114b19ca1ed11c1..8de16eb455cb1d4e4966381ed2aabab4af8575bd 100644 |
| --- a/chrome/browser/extensions/webstore_inline_installer.cc |
| +++ b/chrome/browser/extensions/webstore_inline_installer.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/strings/stringprintf.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/browser_finder.h" |
| +#include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
| #include "content/public/browser/navigation_details.h" |
| #include "content/public/browser/web_contents.h" |
| @@ -27,6 +28,8 @@ const char kInlineInstallSupportedError[] = |
| "redirected to the Chrome Web Store."; |
| const char kInitiatedFromPopupError[] = |
| "Inline installs can not be initiated from pop-up windows."; |
| +const char kInitiatedFromFullscreenError[] = |
| + "Inline installs can not be initiated from fullscreen."; |
| WebstoreInlineInstaller::WebstoreInlineInstaller( |
| content::WebContents* web_contents, |
| @@ -138,6 +141,12 @@ bool WebstoreInlineInstaller::CheckInlineInstallPermitted( |
| *error = kInitiatedFromPopupError; |
| return false; |
| } |
| + FullscreenController* controller = |
| + browser->exclusive_access_manager()->fullscreen_controller(); |
| + if (controller->IsFullscreenForBrowser() | controller->IsTabFullscreen()) { |
|
meacer
2016/10/10 17:57:33
| is the bitwise operator. You want || instead.
Ackerman
2016/10/10 19:35:58
Done.
|
| + *error = kInitiatedFromFullscreenError; |
| + return false; |
| + } |
| // The store may not support inline installs for this item, in which case |
| // we open the store-provided redirect URL in a new tab and abort the |
| // installation process. |