Chromium Code Reviews| Index: components/mus/ws/platform_screen_impl.cc |
| diff --git a/components/mus/ws/platform_screen_impl.cc b/components/mus/ws/platform_screen_impl.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f5072f361a0b68d3272c9c4345cf9adb8b6dc49f |
| --- /dev/null |
| +++ b/components/mus/ws/platform_screen_impl.cc |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2016 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 "components/mus/ws/platform_screen_impl.h" |
| + |
| +#include "base/bind.h" |
| +#include "base/location.h" |
| +#include "base/memory/ptr_util.h" |
| +#include "base/thread_task_runner_handle.h" |
| +#include "ui/gfx/geometry/rect.h" |
| + |
| +namespace mus { |
| +namespace ws { |
| + |
| +// static |
| +std::unique_ptr<PlatformScreen> PlatformScreen::Create() { |
| + return base::WrapUnique(new PlatformScreenImpl); |
| +} |
| + |
| +PlatformScreenImpl::PlatformScreenImpl() : weak_ptr_factory_(this) {} |
| + |
| +PlatformScreenImpl::~PlatformScreenImpl() {} |
| + |
| +void PlatformScreenImpl::Init() {} |
| + |
| +void PlatformScreenImpl::ConfigurePhysicalDisplay( |
| + const ConfiguredDisplayCallback& callback) { |
| + base::ThreadTaskRunnerHandle::Get()->PostTask( |
| + 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.
|
| + weak_ptr_factory_.GetWeakPtr(), callback)); |
| +} |
| + |
| +void PlatformScreenImpl::FixedSizeScreenConfiguration( |
| + ConfiguredDisplayCallback callback) { |
| + callback.Run(1, gfx::Rect(1024, 768)); |
| +} |
| + |
| +} // namespace ws |
| +} // namespace mus |