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

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

Issue 265053005: This gets mojo_launcher.so a little further along toward running. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: benments 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_examples.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/native_viewport/native_viewport_x11.cc
diff --git a/mojo/services/native_viewport/native_viewport_x11.cc b/mojo/services/native_viewport/native_viewport_x11.cc
index be7d1cd79442637531c07ce0942a4aeb18db4df5..50397b87d23ecabdc329254940b4e65e7a61da33 100644
--- a/mojo/services/native_viewport/native_viewport_x11.cc
+++ b/mojo/services/native_viewport/native_viewport_x11.cc
@@ -53,8 +53,9 @@ class NativeViewportX11 : public NativeViewport,
atom_wm_delete_window_ = XInternAtom(display, "WM_DELETE_WINDOW", 1);
XSetWMProtocols(display, window_, &atom_wm_delete_window_, 1);
- // Assumes there is only one instance per process.
- event_source_ = ui::PlatformEventSource::CreateDefault();
+ event_source_.reset(ui::PlatformEventSource::GetInstance());
+ if (!event_source_.get())
+ event_source_ = ui::PlatformEventSource::CreateDefault();
ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this);
delegate_->OnAcceleratedWidgetAvailable(window_);
« no previous file with comments | « mojo/mojo_examples.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698