Index: chrome/browser/chrome_content_browser_client.cc |
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
index f0deebc1fa6c2bb07bcd255d448bc74a923b21ef..02599bce03b0a86aee37744c0ce9bfff5ea42d79 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -15,6 +15,7 @@ |
#include "base/strings/string_tokenizer.h" |
#include "base/utf_string_conversions.h" |
#include "chrome/app/breakpad_mac.h" |
+#include "chrome/browser/app_mode/app_mode_utils.h" |
#include "chrome/browser/browser_about_handler.h" |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/browsing_data/browsing_data_helper.h" |
@@ -538,7 +539,7 @@ std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite( |
if (site.SchemeIs(chrome::kGuestScheme)) |
partition_id = site.spec(); |
- DCHECK(IsValidStoragePartitionId(browser_context,partition_id)); |
+ DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); |
return partition_id; |
} |
@@ -1693,6 +1694,13 @@ bool ChromeContentBrowserClient::CanCreateWindow( |
if (extension && !extensions::BackgroundInfo::AllowJSAccess(extension)) |
*no_javascript_access = true; |
} |
+ |
+ // No new browser window (popup or tab) in app mode. |
+ if (container_type == WINDOW_CONTAINER_TYPE_NORMAL && |
+ chrome::IsRunningInForcedAppMode()) { |
+ return false; |
+ } |
+ |
return true; |
} |