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

Unified Diff: ash/wm/partial_screenshot_view.cc

Issue 461093003: Fix the bug of multiple overlays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more tests 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
Index: ash/wm/partial_screenshot_view.cc
diff --git a/ash/wm/partial_screenshot_view.cc b/ash/wm/partial_screenshot_view.cc
index cec063db85f5e3760334800e4173585611768cb8..b18c9fb530f0cd5076ef1440297c9b3e10333d6a 100644
--- a/ash/wm/partial_screenshot_view.cc
+++ b/ash/wm/partial_screenshot_view.cc
@@ -70,7 +70,7 @@ class PartialScreenshotView::OverlayDelegate
private:
virtual ~OverlayDelegate() {
- Shell::GetInstance()->overlay_filter()->Deactivate();
+ Shell::GetInstance()->overlay_filter()->Deactivate(this);
}
std::vector<views::Widget*> widgets_;
@@ -83,6 +83,10 @@ std::vector<PartialScreenshotView*>
PartialScreenshotView::StartPartialScreenshot(
ScreenshotDelegate* screenshot_delegate) {
std::vector<PartialScreenshotView*> views;
+
+ if (Shell::GetInstance()->overlay_filter()->IsActive())
+ return views;
+
OverlayDelegate* overlay_delegate = new OverlayDelegate();
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
for (aura::Window::Windows::iterator it = root_windows.begin();

Powered by Google App Engine
This is Rietveld 408576698