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

Unified Diff: components/mus/public/cpp/lib/window_tree_client_impl.h

Issue 1982333002: Candidate fix for observe-window-after-free error in WindowTreeClientImpl::LocalSetCapture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Guard observer's AddObserver invocation Created 4 years, 7 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 | « no previous file | components/mus/public/cpp/lib/window_tree_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/public/cpp/lib/window_tree_client_impl.h
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.h b/components/mus/public/cpp/lib/window_tree_client_impl.h
index aef326f7cc320d143bfa1368f37c5eb1f81415f7..6c20caedb544fd6db89d82b85ec50b351fe77c45 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.h
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.h
@@ -133,6 +133,7 @@ class WindowTreeClientImpl : public WindowTreeConnection,
private:
friend class WindowTreeClientImplPrivate;
+ class MusWindowObserver;
enum class NewWindowType {
CHILD,
@@ -147,6 +148,8 @@ class WindowTreeClientImpl : public WindowTreeConnection,
// Returns the oldest InFlightChange that matches |change|.
InFlightChange* GetOldestInFlightChangeMatching(const InFlightChange& change);
+ void SetCaptureWindow(Window* window);
+
// See InFlightChange for details on how InFlightChanges are used.
uint32_t ScheduleInFlightChange(std::unique_ptr<InFlightChange> change);
@@ -288,7 +291,7 @@ class WindowTreeClientImpl : public WindowTreeConnection,
IdToWindowMap windows_;
- Window* capture_window_;
+ std::unique_ptr<MusWindowObserver> capture_window_observer_;
Window* focused_window_;
« no previous file with comments | « no previous file | components/mus/public/cpp/lib/window_tree_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698