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

Unified Diff: components/native_viewport/native_viewport_application_delegate.h

Issue 1135703004: core_services: add native_viewport_service on non-android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.h
diff --git a/components/native_viewport/native_viewport_application_delegate.h b/components/native_viewport/native_viewport_application_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..4584ffff05b837f38d86c023d7d7d2019f936fe9
--- /dev/null
+++ b/components/native_viewport/native_viewport_application_delegate.h
@@ -0,0 +1,53 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_NATIVE_VIEWPORT_NATIVE_VIEWPORT_APPLICATION_DELEGATE_H_
+#define COMPONENTS_NATIVE_VIEWPORT_NATIVE_VIEWPORT_APPLICATION_DELEGATE_H_
+
+#include "base/macros.h"
+#include "components/gles2/gpu_impl.h"
+#include "components/native_viewport/public/interfaces/native_viewport.mojom.h"
+#include "mojo/application/public/cpp/application_delegate.h"
+#include "mojo/application/public/cpp/interface_factory_impl.h"
+#include "mojo/common/tracing_impl.h"
+
+namespace mojo {
+class ApplicationConnection;
+class ApplicationImpl;
+}
+
+namespace native_viewport {
+
+class NativeViewportApplicationDelegate
+ : public mojo::ApplicationDelegate,
+ public mojo::InterfaceFactory<mojo::NativeViewport>,
+ public mojo::InterfaceFactory<mojo::Gpu> {
+ public:
+ NativeViewportApplicationDelegate();
+ ~NativeViewportApplicationDelegate() override;
+
+ private:
+ // mojo::ApplicationDelegate implementation.
+ void Initialize(mojo::ApplicationImpl* application) override;
+ bool ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) override;
+
+ // mojo::InterfaceFactory<NativeViewport> implementation.
+ void Create(mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::NativeViewport> request) override;
+
+ // mojo::InterfaceFactory<Gpu> implementation.
+ void Create(mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::Gpu> request) override;
+
+ scoped_refptr<gles2::GpuState> gpu_state_;
+ bool is_headless_;
+ mojo::TracingImpl tracing_;
+
+ DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationDelegate);
+};
+
+} // namespace native_viewport
+
+#endif // COMPONENTS_NATIVE_VIEWPORT_NATIVE_VIEWPORT_APPLICATION_DELEGATE_H_
« no previous file with comments | « components/native_viewport/main.cc ('k') | components/native_viewport/native_viewport_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698