Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "components/mus/ws/platform_screen_impl.h" | |
| 6 | |
| 7 #include "base/bind.h" | |
| 8 #include "base/location.h" | |
| 9 #include "base/memory/ptr_util.h" | |
| 10 #include "base/thread_task_runner_handle.h" | |
| 11 #include "ui/gfx/geometry/rect.h" | |
| 12 | |
| 13 namespace mus { | |
| 14 namespace ws { | |
| 15 | |
| 16 // static | |
| 17 std::unique_ptr<PlatformScreen> PlatformScreen::Create() { | |
| 18 return base::WrapUnique(new PlatformScreenImpl); | |
| 19 } | |
| 20 | |
| 21 PlatformScreenImpl::PlatformScreenImpl() : weak_ptr_factory_(this) {} | |
| 22 | |
| 23 PlatformScreenImpl::~PlatformScreenImpl() {} | |
| 24 | |
| 25 void PlatformScreenImpl::Init() {} | |
| 26 | |
| 27 void PlatformScreenImpl::ConfigurePhysicalDisplay( | |
| 28 const ConfiguredDisplayCallback& callback) { | |
| 29 base::ThreadTaskRunnerHandle::Get()->PostTask( | |
| 30 FROM_HERE, base::Bind(&PlatformScreenImpl::FixedSizeScreenConfiguration, | |
|
sky
2016/05/04 17:05:44
You shouldn't need to route the callback through t
rjkroege
2016/05/04 22:50:13
Done.
| |
| 31 weak_ptr_factory_.GetWeakPtr(), callback)); | |
| 32 } | |
| 33 | |
| 34 void PlatformScreenImpl::FixedSizeScreenConfiguration( | |
| 35 ConfiguredDisplayCallback callback) { | |
| 36 callback.Run(1, gfx::Rect(1024, 768)); | |
| 37 } | |
| 38 | |
| 39 } // namespace ws | |
| 40 } // namespace mus | |
| OLD | NEW |