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

Unified Diff: mojo/services/native_viewport/native_viewport_service.cc

Issue 267293004: Wires up view manager to an actual display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 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 | « mojo/mojo_services.gypi ('k') | mojo/services/public/cpp/view_manager/lib/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/native_viewport/native_viewport_service.cc
diff --git a/mojo/services/native_viewport/native_viewport_service.cc b/mojo/services/native_viewport/native_viewport_service.cc
index 5625aa13935485f8b2a6cbcb47a8dd95c4a53ae5..9585ae7da0fcc8d3ccda4e6b00ca97a9fb25c6b8 100644
--- a/mojo/services/native_viewport/native_viewport_service.cc
+++ b/mojo/services/native_viewport/native_viewport_service.cc
@@ -36,7 +36,11 @@ class NativeViewportImpl
NativeViewportImpl()
: widget_(gfx::kNullAcceleratedWidget),
waiting_for_event_ack_(false) {}
- virtual ~NativeViewportImpl() {}
+ virtual ~NativeViewportImpl() {
+ // Destroy the NativeViewport early on as it may call us back during
+ // destruction and we want to be in a known state.
+ native_viewport_.reset();
+ }
virtual void Create(const Rect& bounds) OVERRIDE {
native_viewport_ =
« no previous file with comments | « mojo/mojo_services.gypi ('k') | mojo/services/public/cpp/view_manager/lib/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698