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

Unified Diff: chrome/browser/extensions/extension_host.cc

Issue 11301016: [cros] Prevent extensions from opening dialogs on Login screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 5266a3312494a91bffabd0d5a8adb146c84858ba..c1bd02b08a191a1aac8fc33b2b20c2d909d2ed61 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -56,6 +56,10 @@
#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/login/user_manager.h"
+#endif
+
using WebKit::WebDragOperation;
using WebKit::WebDragOperationsMask;
using content::NativeWebKeyboardEvent;
@@ -411,6 +415,14 @@ void ExtensionHost::CloseContents(WebContents* contents) {
}
}
+#if defined(OS_CHROMEOS)
+bool ExtensionHost::ShouldSuppressDialogs() {
+ // Prevent extensions from creating dialogs while user session hasn't
+ // started yet.
+ return !chromeos::UserManager::Get()->IsSessionStarted();
+}
+#endif
+
void ExtensionHost::OnStartDownload(
content::WebContents* source, content::DownloadItem* download) {
// If |source| is in the context of a Browser, show the DownloadShelf on that
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698