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

Side by Side Diff: ui/views/mus/surface_context_factory.cc

Issue 2194893002: services/ui: Revert CLs that broke Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « ui/views/mus/surface_context_factory.h ('k') | ui/views/mus/window_manager_connection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/mus/surface_context_factory.h" 5 #include "ui/views/mus/surface_context_factory.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/output/output_surface.h" 8 #include "cc/output/output_surface.h"
9 #include "cc/resources/shared_bitmap_manager.h" 9 #include "cc/resources/shared_bitmap_manager.h"
10 #include "cc/surfaces/surface_id_allocator.h" 10 #include "cc/surfaces/surface_id_allocator.h"
11 #include "services/shell/public/interfaces/connector.mojom.h"
11 #include "services/ui/public/cpp/window.h" 12 #include "services/ui/public/cpp/window.h"
12 #include "ui/compositor/reflector.h" 13 #include "ui/compositor/reflector.h"
13 #include "ui/gl/gl_bindings.h" 14 #include "ui/gl/gl_bindings.h"
14 15
15 namespace views { 16 namespace views {
16 namespace { 17 namespace {
17 18
18 class FakeReflector : public ui::Reflector { 19 class FakeReflector : public ui::Reflector {
19 public: 20 public:
20 FakeReflector() {} 21 FakeReflector() {}
21 ~FakeReflector() override {} 22 ~FakeReflector() override {}
22 void OnMirroringCompositorResized() override {} 23 void OnMirroringCompositorResized() override {}
23 void AddMirroringLayer(ui::Layer* layer) override {} 24 void AddMirroringLayer(ui::Layer* layer) override {}
24 void RemoveMirroringLayer(ui::Layer* layer) override {} 25 void RemoveMirroringLayer(ui::Layer* layer) override {}
25 }; 26 };
26 27
27 } // namespace 28 } // namespace
28 29
29 SurfaceContextFactory::SurfaceContextFactory( 30 SurfaceContextFactory::SurfaceContextFactory(
31 shell::Connector* connector,
30 ui::Window* window, 32 ui::Window* window,
31 ui::mojom::SurfaceType surface_type) 33 ui::mojom::SurfaceType surface_type)
32 : surface_binding_(window, surface_type), next_surface_id_namespace_(1u) {} 34 : surface_binding_(connector, window, surface_type),
35 next_surface_id_namespace_(1u) {}
33 36
34 SurfaceContextFactory::~SurfaceContextFactory() {} 37 SurfaceContextFactory::~SurfaceContextFactory() {}
35 38
36 void SurfaceContextFactory::CreateOutputSurface( 39 void SurfaceContextFactory::CreateOutputSurface(
37 base::WeakPtr<ui::Compositor> compositor) { 40 base::WeakPtr<ui::Compositor> compositor) {
38 // NOTIMPLEMENTED(); 41 // NOTIMPLEMENTED();
39 std::unique_ptr<cc::OutputSurface> surface = 42 std::unique_ptr<cc::OutputSurface> surface =
40 surface_binding_.CreateOutputSurface(); 43 surface_binding_.CreateOutputSurface();
41 if (surface) 44 if (surface)
42 compositor->SetOutputSurface(std::move(surface)); 45 compositor->SetOutputSurface(std::move(surface));
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // NOTIMPLEMENTED(); 98 // NOTIMPLEMENTED();
96 return nullptr; 99 return nullptr;
97 } 100 }
98 101
99 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, 102 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor,
100 const gfx::Size& size) { 103 const gfx::Size& size) {
101 // NOTIMPLEMENTED(); 104 // NOTIMPLEMENTED();
102 } 105 }
103 106
104 } // namespace views 107 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/surface_context_factory.h ('k') | ui/views/mus/window_manager_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698