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

Unified Diff: components/mus/ws/platform_screen_impl.cc

Issue 1899923002: Basic display management for mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix chromecast build Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/ws/platform_screen_impl.h ('k') | components/mus/ws/platform_screen_impl_ozone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4d05d38eb6e7e9f688a13d099e041fed0db03505
--- /dev/null
+++ b/components/mus/ws/platform_screen_impl.cc
@@ -0,0 +1,43 @@
+// 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 {
+namespace {
+
+void FixedSizeScreenConfiguration(
+ const PlatformScreen::ConfiguredDisplayCallback& callback) {
+ callback.Run(1, gfx::Rect(1024, 768));
+}
+
+} // namespace
+
+// static
+std::unique_ptr<PlatformScreen> PlatformScreen::Create() {
+ return base::WrapUnique(new PlatformScreenImpl);
+}
+
+PlatformScreenImpl::PlatformScreenImpl() {}
+
+PlatformScreenImpl::~PlatformScreenImpl() {}
+
+void PlatformScreenImpl::Init() {}
+
+void PlatformScreenImpl::ConfigurePhysicalDisplay(
+ const PlatformScreen::ConfiguredDisplayCallback& callback) {
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&FixedSizeScreenConfiguration, callback));
+}
+
+} // namespace ws
+} // namespace mus
« no previous file with comments | « components/mus/ws/platform_screen_impl.h ('k') | components/mus/ws/platform_screen_impl_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698