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

Unified Diff: mojo/services/surfaces/display_factory_impl.cc

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 9 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/services/surfaces/display_factory_impl.h ('k') | mojo/services/surfaces/display_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/surfaces/display_factory_impl.cc
diff --git a/mojo/services/surfaces/display_factory_impl.cc b/mojo/services/surfaces/display_factory_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..11e9bf2f825383f922301769427e76b5a6ccd158
--- /dev/null
+++ b/mojo/services/surfaces/display_factory_impl.cc
@@ -0,0 +1,36 @@
+// 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.
+
+#include "mojo/services/surfaces/display_factory_impl.h"
+
+#include "cc/surfaces/surface_id.h"
+
+namespace surfaces {
+
+DisplayFactoryImpl::DisplayFactoryImpl(
+ cc::SurfaceManager* manager,
+ uint32_t id_namespace,
+ SurfacesScheduler* scheduler,
+ mojo::InterfaceRequest<mojo::DisplayFactory> request)
+ : id_namespace_(id_namespace),
+ next_local_id_(1u),
+ scheduler_(scheduler),
+ manager_(manager),
+ binding_(this, request.Pass()) {
+}
+
+DisplayFactoryImpl::~DisplayFactoryImpl() {
+}
+
+void DisplayFactoryImpl::Create(
+ mojo::ContextProviderPtr context_provider,
+ mojo::ResourceReturnerPtr returner,
+ mojo::InterfaceRequest<mojo::Display> display_request) {
+ cc::SurfaceId cc_id(static_cast<uint64_t>(id_namespace_) << 32 |
+ next_local_id_++);
+ new DisplayImpl(manager_, cc_id, scheduler_, context_provider.Pass(),
+ returner.Pass(), display_request.Pass());
+}
+
+} // namespace surfaces
« no previous file with comments | « mojo/services/surfaces/display_factory_impl.h ('k') | mojo/services/surfaces/display_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698