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

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

Issue 2345043003: Unify mustash display closing code paths. (Closed)
Patch Set: Rebase. 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
« no previous file with comments | « services/ui/display/platform_screen_stub.h ('k') | services/ui/ws/display.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
36 void PlatformScreenStub::AddInterfaces(shell::InterfaceRegistry* registry) {} 36 void PlatformScreenStub::AddInterfaces(shell::InterfaceRegistry* registry) {}
37 37
38 void PlatformScreenStub::Init(PlatformScreenDelegate* delegate) { 38 void PlatformScreenStub::Init(PlatformScreenDelegate* delegate) {
39 DCHECK(delegate); 39 DCHECK(delegate);
40 delegate_ = delegate; 40 delegate_ = delegate;
41 base::ThreadTaskRunnerHandle::Get()->PostTask( 41 base::ThreadTaskRunnerHandle::Get()->PostTask(
42 FROM_HERE, base::Bind(&PlatformScreenStub::FixedSizeScreenConfiguration, 42 FROM_HERE, base::Bind(&PlatformScreenStub::FixedSizeScreenConfiguration,
43 weak_ptr_factory_.GetWeakPtr())); 43 weak_ptr_factory_.GetWeakPtr()));
44 } 44 }
45 45
46 void PlatformScreenStub::RequestCloseDisplay(int64_t display_id) {
47 if (display_id == kDisplayId) {
48 base::ThreadTaskRunnerHandle::Get()->PostTask(
49 FROM_HERE, base::Bind(&PlatformScreenDelegate::OnDisplayRemoved,
50 base::Unretained(delegate_), display_id));
51 }
52 }
53
46 int64_t PlatformScreenStub::GetPrimaryDisplayId() const { 54 int64_t PlatformScreenStub::GetPrimaryDisplayId() const {
47 return kDisplayId; 55 return kDisplayId;
48 } 56 }
49 57
50 } // namespace display 58 } // namespace display
OLDNEW
« no previous file with comments | « services/ui/display/platform_screen_stub.h ('k') | services/ui/ws/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698