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

Unified Diff: mandoline/ui/aura/surface_context_factory.cc

Issue 1123643007: Restore aura support from Mojo repo. (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
« no previous file with comments | « mandoline/ui/aura/surface_context_factory.h ('k') | mandoline/ui/aura/window_tree_host_mojo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/ui/aura/surface_context_factory.cc
diff --git a/mandoline/ui/aura/surface_context_factory.cc b/mandoline/ui/aura/surface_context_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0c5af87b90514a6a590e30eb0fc0cfddfc3d729a
--- /dev/null
+++ b/mandoline/ui/aura/surface_context_factory.cc
@@ -0,0 +1,100 @@
+// 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 "mandoline/ui/aura/surface_context_factory.h"
+
+#include "cc/output/output_surface.h"
+#include "cc/resources/shared_bitmap_manager.h"
+#include "cc/surfaces/surface_id_allocator.h"
+#include "components/view_manager/public/cpp/view.h"
+#include "mojo/public/interfaces/application/shell.mojom.h"
+#include "ui/compositor/reflector.h"
+#include "ui/gl/gl_bindings.h"
+
+namespace mandoline {
+namespace {
+
+class FakeReflector : public ui::Reflector {
+ public:
+ FakeReflector() {}
+ ~FakeReflector() override {}
+ void OnMirroringCompositorResized() override {}
+ void AddMirroringLayer(ui::Layer* layer) override {}
+ void RemoveMirroringLayer(ui::Layer* layer) override {}
+};
+
+}
+
+SurfaceContextFactory::SurfaceContextFactory(mojo::Shell* shell,
+ mojo::View* view)
+ : surface_binding_(shell, view) {
+}
+
+SurfaceContextFactory::~SurfaceContextFactory() {
+}
+
+void SurfaceContextFactory::CreateOutputSurface(
+ base::WeakPtr<ui::Compositor> compositor) {
+ NOTIMPLEMENTED();
+ compositor->SetOutputSurface(surface_binding_.CreateOutputSurface());
+}
+
+scoped_ptr<ui::Reflector> SurfaceContextFactory::CreateReflector(
+ ui::Compositor* mirroed_compositor,
+ ui::Layer* mirroring_layer) {
+ NOTIMPLEMENTED();
+ return make_scoped_ptr(new FakeReflector);
+}
+
+void SurfaceContextFactory::RemoveReflector(ui::Reflector* reflector) {
+ NOTIMPLEMENTED();
+}
+
+scoped_refptr<cc::ContextProvider>
+SurfaceContextFactory::SharedMainThreadContextProvider() {
+ NOTIMPLEMENTED();
+ return nullptr;
+}
+
+void SurfaceContextFactory::RemoveCompositor(ui::Compositor* compositor) {
+ NOTIMPLEMENTED();
+}
+
+bool SurfaceContextFactory::DoesCreateTestContexts() {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+uint32 SurfaceContextFactory::GetImageTextureTarget() {
+ return GL_TEXTURE_2D;
+}
+
+cc::SharedBitmapManager* SurfaceContextFactory::GetSharedBitmapManager() {
+ NOTIMPLEMENTED();
+ return nullptr;
+}
+
+gpu::GpuMemoryBufferManager*
+SurfaceContextFactory::GetGpuMemoryBufferManager() {
+ NOTIMPLEMENTED();
+ return nullptr;
+}
+
+cc::TaskGraphRunner* SurfaceContextFactory::GetTaskGraphRunner() {
+ NOTIMPLEMENTED();
+ return nullptr;
+}
+
+scoped_ptr<cc::SurfaceIdAllocator>
+SurfaceContextFactory::CreateSurfaceIdAllocator() {
+ NOTIMPLEMENTED();
+ return nullptr;
+}
+
+void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor,
+ const gfx::Size& size) {
+ NOTIMPLEMENTED();
+}
+
+} // namespace mandoline
« no previous file with comments | « mandoline/ui/aura/surface_context_factory.h ('k') | mandoline/ui/aura/window_tree_host_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698