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

Side by Side Diff: components/exo/surface.cc

Issue 2592623002: mojo:: Introduce InterfaceRequest ctor that takes in InterfacePtr* (Closed)
Patch Set: Rebase + response to review Created 3 years, 12 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 | « chrome/gpu/gpu_arc_video_service.cc ('k') | components/leveldb/leveldb_mojo_proxy.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 "components/exo/surface.h" 5 #include "components/exo/surface.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // TODO(fsamuel): exo should not use context_factory_private. Instead, we should 172 // TODO(fsamuel): exo should not use context_factory_private. Instead, we should
173 // request a CompositorFrameSink from the aura::Window. Setting up the 173 // request a CompositorFrameSink from the aura::Window. Setting up the
174 // BeginFrame hierarchy should be an internal implementation detail of aura or 174 // BeginFrame hierarchy should be an internal implementation detail of aura or
175 // mus in aura-mus. 175 // mus in aura-mus.
176 Surface::Surface() 176 Surface::Surface()
177 : window_(new aura::Window(new CustomWindowDelegate(this))), 177 : window_(new aura::Window(new CustomWindowDelegate(this))),
178 frame_sink_id_(aura::Env::GetInstance() 178 frame_sink_id_(aura::Env::GetInstance()
179 ->context_factory_private() 179 ->context_factory_private()
180 ->AllocateFrameSinkId()) { 180 ->AllocateFrameSinkId()) {
181 cc::mojom::MojoCompositorFrameSinkClientPtr frame_sink_holder_ptr; 181 cc::mojom::MojoCompositorFrameSinkClientPtr frame_sink_holder_ptr;
182 cc::mojom::MojoCompositorFrameSinkClientRequest frame_sink_client_request = 182 cc::mojom::MojoCompositorFrameSinkClientRequest frame_sink_client_request(
183 mojo::MakeRequest(&frame_sink_holder_ptr); 183 &frame_sink_holder_ptr);
184 std::unique_ptr<CompositorFrameSink> frame_sink(new CompositorFrameSink( 184 std::unique_ptr<CompositorFrameSink> frame_sink(new CompositorFrameSink(
185 frame_sink_id_, 185 frame_sink_id_,
186 aura::Env::GetInstance()->context_factory_private()->GetSurfaceManager(), 186 aura::Env::GetInstance()->context_factory_private()->GetSurfaceManager(),
187 std::move(frame_sink_holder_ptr))); 187 std::move(frame_sink_holder_ptr)));
188 compositor_frame_sink_holder_ = new CompositorFrameSinkHolder( 188 compositor_frame_sink_holder_ = new CompositorFrameSinkHolder(
189 this, std::move(frame_sink), std::move(frame_sink_client_request)); 189 this, std::move(frame_sink), std::move(frame_sink_client_request));
190 surface_reference_factory_ = 190 surface_reference_factory_ =
191 new CustomSurfaceReferenceFactory(compositor_frame_sink_holder_.get()); 191 new CustomSurfaceReferenceFactory(compositor_frame_sink_holder_.get());
192 window_->SetType(ui::wm::WINDOW_TYPE_CONTROL); 192 window_->SetType(ui::wm::WINDOW_TYPE_CONTROL);
193 window_->SetName("ExoSurface"); 193 window_->SetName("ExoSurface");
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 795
796 int64_t Surface::GetPropertyInternal(const void* key, 796 int64_t Surface::GetPropertyInternal(const void* key,
797 int64_t default_value) const { 797 int64_t default_value) const {
798 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key); 798 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key);
799 if (iter == prop_map_.end()) 799 if (iter == prop_map_.end())
800 return default_value; 800 return default_value;
801 return iter->second.value; 801 return iter->second.value;
802 } 802 }
803 803
804 } // namespace exo 804 } // namespace exo
OLDNEW
« no previous file with comments | « chrome/gpu/gpu_arc_video_service.cc ('k') | components/leveldb/leveldb_mojo_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698