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

Unified Diff: ash/keyboard_overlay/keyboard_overlay_view.cc

Issue 461093003: Fix the bug of multiple overlays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix Created 6 years, 4 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 | « ash/first_run/first_run_helper_impl.cc ('k') | ash/test/test_overlay_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/keyboard_overlay/keyboard_overlay_view.cc
diff --git a/ash/keyboard_overlay/keyboard_overlay_view.cc b/ash/keyboard_overlay/keyboard_overlay_view.cc
index 2847653ca57630f0ddf4bbb1804315998379d173..e5a71f9a2453fd17f7132c876ac56a7f3519bdaa 100644
--- a/ash/keyboard_overlay/keyboard_overlay_view.cc
+++ b/ash/keyboard_overlay/keyboard_overlay_view.cc
@@ -43,7 +43,7 @@ KeyboardOverlayView::~KeyboardOverlayView() {
}
void KeyboardOverlayView::Cancel() {
- Shell::GetInstance()->overlay_filter()->Deactivate();
+ Shell::GetInstance()->overlay_filter()->Deactivate(this);
views::Widget* widget = GetWidget();
if (widget)
widget->Close();
@@ -66,10 +66,14 @@ aura::Window* KeyboardOverlayView::GetWindow() {
return GetWidget()->GetNativeWindow();
}
+// static
void KeyboardOverlayView::ShowDialog(
content::BrowserContext* context,
WebContentsHandler* handler,
const GURL& url) {
+ if (Shell::GetInstance()->overlay_filter()->IsActive())
+ return;
+
KeyboardOverlayDelegate* delegate = new KeyboardOverlayDelegate(
l10n_util::GetStringUTF16(IDS_ASH_KEYBOARD_OVERLAY_TITLE), url);
KeyboardOverlayView* view =
« no previous file with comments | « ash/first_run/first_run_helper_impl.cc ('k') | ash/test/test_overlay_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698