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

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

Issue 404913002: Break dependency of native_viewport_service on mojo::shell::Context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 6 years, 5 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: 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 b7c80524c78349e953c76582ee914b72f9eea57f..825886fcdd2520db222ccaab7762f4c1b7882916 100644
--- a/mojo/services/native_viewport/native_viewport_service.cc
+++ b/mojo/services/native_viewport/native_viewport_service.cc
@@ -12,6 +12,7 @@
#include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
#include "mojo/services/gles2/command_buffer_impl.h"
#include "mojo/services/native_viewport/native_viewport.h"
+#include "mojo/services/native_viewport/native_viewport_context.h"
#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
#include "mojo/services/public/cpp/input_events/input_events_type_converters.h"
#include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom.h"
@@ -34,7 +35,7 @@ class NativeViewportImpl
public NativeViewportDelegate {
public:
NativeViewportImpl(ApplicationConnection* connection,
- shell::Context* context)
+ NativeViewportContext* context)
: context_(context),
widget_(gfx::kNullAcceleratedWidget),
waiting_for_event_ack_(false),
@@ -146,7 +147,7 @@ class NativeViewportImpl
command_buffer_.reset();
}
- shell::Context* context_;
+ NativeViewportContext* context_;
gfx::AcceleratedWidget widget_;
scoped_ptr<services::NativeViewport> native_viewport_;
InterfaceRequest<CommandBuffer> command_buffer_request_;
@@ -157,7 +158,7 @@ class NativeViewportImpl
class NVSDelegate : public ApplicationDelegate {
public:
- NVSDelegate(shell::Context* context) : context_(context) {}
+ NVSDelegate(NativeViewportContext* context) : context_(context) {}
virtual ~NVSDelegate() {}
virtual bool ConfigureIncomingConnection(
@@ -167,17 +168,18 @@ class NVSDelegate : public ApplicationDelegate {
}
private:
- mojo::shell::Context* context_;
+ NativeViewportContext* context_;
};
-} // namespace services
-} // namespace mojo
-
MOJO_NATIVE_VIEWPORT_EXPORT mojo::ApplicationImpl*
CreateNativeViewportService(
- mojo::shell::Context* context,
- mojo::ScopedMessagePipeHandle service_provider_handle) {
- mojo::ApplicationImpl* app = new mojo::ApplicationImpl(
- new mojo::services::NVSDelegate(context), service_provider_handle.Pass());
+ NativeViewportContext* context,
+ ScopedMessagePipeHandle service_provider_handle) {
+ ApplicationImpl* app = new ApplicationImpl(
+ new NVSDelegate(context), service_provider_handle.Pass());
return app;
}
+
+} // namespace services
+} // namespace mojo
+

Powered by Google App Engine
This is Rietveld 408576698