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

Unified Diff: components/native_viewport/native_viewport_application_delegate.cc

Issue 1139673003: Make Mandoline shut down cleanly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
Index: components/native_viewport/native_viewport_application_delegate.cc
diff --git a/components/native_viewport/native_viewport_application_delegate.cc b/components/native_viewport/native_viewport_application_delegate.cc
index 4f247c7a5c55a20feedee52352257dc7d6b7d56a..365b7f710767670cf2d475f4fbe0d3e500febe8c 100644
--- a/components/native_viewport/native_viewport_application_delegate.cc
+++ b/components/native_viewport/native_viewport_application_delegate.cc
@@ -10,6 +10,7 @@
#include "mojo/application/public/cpp/application_connection.h"
#include "mojo/application/public/cpp/application_impl.h"
#include "ui/events/event_switches.h"
+#include "ui/events/platform/platform_event_source.h"
#include "ui/gl/gl_surface.h"
namespace native_viewport {
@@ -23,6 +24,7 @@ NativeViewportApplicationDelegate::~NativeViewportApplicationDelegate() {
void NativeViewportApplicationDelegate::Initialize(
mojo::ApplicationImpl* application) {
+ event_source_ = ui::PlatformEventSource::CreateDefault();
tracing_.Initialize(application);
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
@@ -47,7 +49,8 @@ void NativeViewportApplicationDelegate::Create(
mojo::InterfaceRequest<mojo::NativeViewport> request) {
if (!gpu_state_.get())
gpu_state_ = new gles2::GpuState;
- new NativeViewportImpl(is_headless_, gpu_state_, request.Pass());
+ new NativeViewportImpl(is_headless_, gpu_state_, request.Pass(),
+ app_lifetime_helper_.CreateAppRefCount());
}
void NativeViewportApplicationDelegate::Create(
« no previous file with comments | « components/native_viewport/native_viewport_application_delegate.h ('k') | components/native_viewport/native_viewport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698