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.h" | |
| 6 | |
| 7 #include "base/bind.h" | |
| 8 #include "base/location.h" | |
| 9 #include "base/thread_task_runner_handle.h" | |
| 10 #include "ui/display/types/display_snapshot.h" | |
| 11 #include "ui/display/types/native_display_delegate.h" | |
| 12 #include "ui/display/types/native_display_observer.h" | |
| 13 | |
| 14 namespace mus { | |
| 15 namespace ws { | |
| 16 | |
| 17 PlatformScreen::PlatformScreen() : weak_ptr_factory_(this) {} | |
| 18 | |
| 19 PlatformScreen::~PlatformScreen() {} | |
| 20 | |
| 21 void PlatformScreen::Init() {} | |
| 22 | |
| 23 void PlatformScreen::FixedSizeScreenConfiguration( | |
| 24 ConfiguredDisplayCallback callback) { | |
| 25 callback.Run(1, gfx::Rect(1024, 768)); | |
| 26 } | |
| 27 | |
| 28 void PlatformScreen::ConfigurePhysicalDisplay( | |
| 29 ConfiguredDisplayCallback callback) { | |
| 30 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
| |
| 31 FROM_HERE, base::Bind(&PlatformScreen::FixedSizeScreenConfiguration, | |
| 32 weak_ptr_factory_.GetWeakPtr(), callback)); | |
| 33 } | |
| 34 | |
| 35 void PlatformScreen::OnConfigurationChanged() { | |
| 36 NOTREACHED(); | |
| 37 } | |
| 38 void PlatformScreen::OnDisplaysAquired( | |
| 39 ConfiguredDisplayCallback callback, | |
| 40 const std::vector<ui::DisplaySnapshot*>& displays) { | |
| 41 NOTREACHED(); | |
| 42 } | |
| 43 void PlatformScreen::OnDisplayConfigured(ConfiguredDisplayCallback callback, | |
| 44 int64_t id, | |
| 45 const gfx::Rect& bounds, | |
| 46 bool success) { | |
| 47 NOTREACHED(); | |
| 48 } | |
| 49 | |
| 50 } // namespace ws | |
| 51 } // namespace mus | |
| OLD | NEW |