Chromium Code Reviews| Index: components/mus/ws/platform_screen.cc |
| diff --git a/components/mus/ws/platform_screen.cc b/components/mus/ws/platform_screen.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..72fbd3ac4edad845f9ce709d7ca9382eccbc8a16 |
| --- /dev/null |
| +++ b/components/mus/ws/platform_screen.cc |
| @@ -0,0 +1,51 @@ |
| +// 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.h" |
| + |
| +#include "base/bind.h" |
| +#include "base/location.h" |
| +#include "base/thread_task_runner_handle.h" |
| +#include "ui/display/types/display_snapshot.h" |
| +#include "ui/display/types/native_display_delegate.h" |
| +#include "ui/display/types/native_display_observer.h" |
| + |
| +namespace mus { |
| +namespace ws { |
| + |
| +PlatformScreen::PlatformScreen() : weak_ptr_factory_(this) {} |
| + |
| +PlatformScreen::~PlatformScreen() {} |
| + |
| +void PlatformScreen::Init() {} |
| + |
| +void PlatformScreen::FixedSizeScreenConfiguration( |
| + ConfiguredDisplayCallback callback) { |
| + callback.Run(1, gfx::Rect(1024, 768)); |
| +} |
| + |
| +void PlatformScreen::ConfigurePhysicalDisplay( |
| + ConfiguredDisplayCallback callback) { |
| + base::ThreadTaskRunnerHandle::Get()->PostTask( |
|
sky
2016/05/03 02:39:51
Why does this need to be async?
rjkroege
2016/05/03 21:03:03
This way, it has the same callback semantics as th
|
| + FROM_HERE, base::Bind(&PlatformScreen::FixedSizeScreenConfiguration, |
| + weak_ptr_factory_.GetWeakPtr(), callback)); |
| +} |
| + |
| +void PlatformScreen::OnConfigurationChanged() { |
| + NOTREACHED(); |
| +} |
| +void PlatformScreen::OnDisplaysAquired( |
| + ConfiguredDisplayCallback callback, |
| + const std::vector<ui::DisplaySnapshot*>& displays) { |
| + NOTREACHED(); |
| +} |
| +void PlatformScreen::OnDisplayConfigured(ConfiguredDisplayCallback callback, |
| + int64_t id, |
| + const gfx::Rect& bounds, |
| + bool success) { |
| + NOTREACHED(); |
| +} |
| + |
| +} // namespace ws |
| +} // namespace mus |