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

Unified Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2083853002: exo: Recreate Surface resources on context lost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits Created 4 years, 6 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 | « ui/compositor/test/in_process_context_factory.h ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/in_process_context_factory.cc
diff --git a/ui/compositor/test/in_process_context_factory.cc b/ui/compositor/test/in_process_context_factory.cc
index e68752f8f9c473c02d83e23eb81cbeedbf48377c..fdc8dde738695e65a8674f954171dd506d79d22e 100644
--- a/ui/compositor/test/in_process_context_factory.cc
+++ b/ui/compositor/test/in_process_context_factory.cc
@@ -112,6 +112,10 @@ InProcessContextFactory::~InProcessContextFactory() {
DCHECK(per_compositor_data_.empty());
}
+void InProcessContextFactory::SendOnLostResources() {
+ FOR_EACH_OBSERVER(ContextFactoryObserver, observer_list_, OnLostResources());
+}
+
void InProcessContextFactory::CreateOutputSurface(
base::WeakPtr<Compositor> compositor) {
// Try to reuse existing shared worker context provider.
@@ -261,4 +265,12 @@ void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor,
per_compositor_data_[compositor]->Resize(size);
}
+void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
} // namespace ui
« no previous file with comments | « ui/compositor/test/in_process_context_factory.h ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698