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

Side by Side Diff: services/ui/display/platform_screen_stub.cc

Issue 2310133002: Add mojom::DisplayController. (Closed)
Patch Set: Add missing dep. Created 4 years, 3 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/display/platform_screen_stub.h" 5 #include "services/ui/display/platform_screen_stub.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 11 matching lines...) Expand all
22 // static 22 // static
23 std::unique_ptr<PlatformScreen> PlatformScreen::Create() { 23 std::unique_ptr<PlatformScreen> PlatformScreen::Create() {
24 return base::MakeUnique<PlatformScreenStub>(); 24 return base::MakeUnique<PlatformScreenStub>();
25 } 25 }
26 26
27 PlatformScreenStub::PlatformScreenStub() : weak_ptr_factory_(this) {} 27 PlatformScreenStub::PlatformScreenStub() : weak_ptr_factory_(this) {}
28 28
29 PlatformScreenStub::~PlatformScreenStub() {} 29 PlatformScreenStub::~PlatformScreenStub() {}
30 30
31 void PlatformScreenStub::FixedSizeScreenConfiguration() { 31 void PlatformScreenStub::FixedSizeScreenConfiguration() {
32 delegate_->OnDisplayAdded(this, kDisplayId, gfx::Rect(1024, 768)); 32 delegate_->OnDisplayAdded(kDisplayId, gfx::Rect(1024, 768));
33 } 33 }
34 34
35 void PlatformScreenStub::Init(PlatformScreenDelegate* delegate) { 35 void PlatformScreenStub::Init(PlatformScreenDelegate* delegate) {
36 DCHECK(delegate); 36 DCHECK(delegate);
37 delegate_ = delegate; 37 delegate_ = delegate;
38 base::ThreadTaskRunnerHandle::Get()->PostTask( 38 base::ThreadTaskRunnerHandle::Get()->PostTask(
39 FROM_HERE, base::Bind(&PlatformScreenStub::FixedSizeScreenConfiguration, 39 FROM_HERE, base::Bind(&PlatformScreenStub::FixedSizeScreenConfiguration,
40 weak_ptr_factory_.GetWeakPtr())); 40 weak_ptr_factory_.GetWeakPtr()));
41 } 41 }
42 42
43 int64_t PlatformScreenStub::GetPrimaryDisplayId() const { 43 int64_t PlatformScreenStub::GetPrimaryDisplayId() const {
44 return kDisplayId; 44 return kDisplayId;
45 } 45 }
46 46
47 } // namespace display 47 } // namespace display
OLDNEW
« no previous file with comments | « services/ui/display/platform_screen_ozone_unittests.cc ('k') | services/ui/public/interfaces/display/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698