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

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: 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/wm/overlay_event_filter_unittest.cc ('k') | ash/wm/partial_screenshot_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « ash/wm/overlay_event_filter_unittest.cc ('k') | ash/wm/partial_screenshot_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698