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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
(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_impl.h"
6
7 #include "base/bind.h"
8 #include "base/location.h"
9 #include "base/memory/ptr_util.h"
10 #include "base/thread_task_runner_handle.h"
11 #include "ui/gfx/geometry/rect.h"
12
13 namespace mus {
14 namespace ws {
15
16 // static
17 std::unique_ptr<PlatformScreen> PlatformScreen::Create() {
18 return base::WrapUnique(new PlatformScreenImpl);
19 }
20
21 PlatformScreenImpl::PlatformScreenImpl() : weak_ptr_factory_(this) {}
22
23 PlatformScreenImpl::~PlatformScreenImpl() {}
24
25 void PlatformScreenImpl::Init() {}
26
27 void PlatformScreenImpl::ConfigurePhysicalDisplay(
28 const ConfiguredDisplayCallback& callback) {
29 base::ThreadTaskRunnerHandle::Get()->PostTask(
30 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.
31 weak_ptr_factory_.GetWeakPtr(), callback));
32 }
33
34 void PlatformScreenImpl::FixedSizeScreenConfiguration(
35 ConfiguredDisplayCallback callback) {
36 callback.Run(1, gfx::Rect(1024, 768));
37 }
38
39 } // namespace ws
40 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698