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

Side by Side Diff: components/mus/ws/platform_screen.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.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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698