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

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: review comments Created 4 years, 8 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
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

Powered by Google App Engine
This is Rietveld 408576698