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

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

Issue 1402213002: Moves mandoline/ui/aura to ui/views/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable presubmit Created 5 years, 2 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_binding.h ('k') | ui/views/mus/surface_context_factory.h » ('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 "mandoline/ui/aura/surface_binding.h" 5 #include "ui/views/mus/surface_binding.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/threading/thread_local.h" 11 #include "base/threading/thread_local.h"
12 #include "cc/output/compositor_frame.h" 12 #include "cc/output/compositor_frame.h"
13 #include "cc/output/output_surface.h" 13 #include "cc/output/output_surface.h"
14 #include "cc/output/output_surface_client.h" 14 #include "cc/output/output_surface_client.h"
15 #include "cc/output/software_output_device.h" 15 #include "cc/output/software_output_device.h"
16 #include "cc/resources/shared_bitmap_manager.h" 16 #include "cc/resources/shared_bitmap_manager.h"
17 #include "components/mus/public/cpp/context_provider.h" 17 #include "components/mus/public/cpp/context_provider.h"
18 #include "components/mus/public/cpp/output_surface.h" 18 #include "components/mus/public/cpp/output_surface.h"
19 #include "components/mus/public/cpp/view.h" 19 #include "components/mus/public/cpp/view.h"
20 #include "components/mus/public/cpp/view_tree_connection.h" 20 #include "components/mus/public/cpp/view_tree_connection.h"
21 #include "components/mus/public/interfaces/gpu.mojom.h" 21 #include "components/mus/public/interfaces/gpu.mojom.h"
22 #include "mandoline/ui/aura/window_tree_host_mojo.h"
23 #include "mojo/application/public/cpp/connect.h" 22 #include "mojo/application/public/cpp/connect.h"
24 #include "mojo/application/public/interfaces/shell.mojom.h" 23 #include "mojo/application/public/interfaces/shell.mojom.h"
25 #include "mojo/converters/geometry/geometry_type_converters.h" 24 #include "mojo/converters/geometry/geometry_type_converters.h"
26 #include "mojo/converters/surfaces/surfaces_type_converters.h" 25 #include "mojo/converters/surfaces/surfaces_type_converters.h"
27 #include "mojo/public/cpp/bindings/binding.h" 26 #include "mojo/public/cpp/bindings/binding.h"
27 #include "ui/views/mus/window_tree_host_mus.h"
28 28
29 namespace mandoline { 29 namespace views {
30 namespace { 30 namespace {
31 void OnGotContentHandlerID(uint32_t content_handler_id) {} 31 void OnGotContentHandlerID(uint32_t content_handler_id) {}
32 } // namespace 32 } // namespace
33 33
34 // PerConnectionState ---------------------------------------------------------- 34 // PerConnectionState ----------------------------------------------------------
35 35
36 // State needed per ViewManager. Provides the real implementation of 36 // State needed per ViewManager. Provides the real implementation of
37 // CreateOutputSurface. SurfaceBinding obtains a pointer to the 37 // CreateOutputSurface. SurfaceBinding obtains a pointer to the
38 // PerConnectionState appropriate for the ViewManager. PerConnectionState is 38 // PerConnectionState appropriate for the ViewManager. PerConnectionState is
39 // stored in a thread local map. When no more refereces to a PerConnectionState 39 // stored in a thread local map. When no more refereces to a PerConnectionState
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 nullptr, nullptr, 127 nullptr, nullptr,
128 base::Bind(&OnGotContentHandlerID)); 128 base::Bind(&OnGotContentHandlerID));
129 ConnectToService(service_provider.get(), &gpu_); 129 ConnectToService(service_provider.get(), &gpu_);
130 } 130 }
131 131
132 // SurfaceBinding -------------------------------------------------------------- 132 // SurfaceBinding --------------------------------------------------------------
133 133
134 SurfaceBinding::SurfaceBinding(mojo::Shell* shell, mus::View* view) 134 SurfaceBinding::SurfaceBinding(mojo::Shell* shell, mus::View* view)
135 : view_(view), state_(PerConnectionState::Get(shell, view->connection())) {} 135 : view_(view), state_(PerConnectionState::Get(shell, view->connection())) {}
136 136
137 SurfaceBinding::~SurfaceBinding() { 137 SurfaceBinding::~SurfaceBinding() {}
138 }
139 138
140 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() { 139 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() {
141 return state_->CreateOutputSurface(view_); 140 return state_->CreateOutputSurface(view_);
142 } 141 }
143 142
144 } // namespace mandoline 143 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/surface_binding.h ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698