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

Side by Side Diff: services/ui/display/platform_screen_impl_ozone.h

Issue 2274353003: Add PlatformScreenDelegate and start implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes for comments. 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 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ 5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_
6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 10 matching lines...) Expand all
21 // PlatformScreenImplOzone provides the necessary functionality to configure all 21 // PlatformScreenImplOzone provides the necessary functionality to configure all
22 // attached physical displays on the ozone platform. 22 // attached physical displays on the ozone platform.
23 class PlatformScreenImplOzone : public PlatformScreen, 23 class PlatformScreenImplOzone : public PlatformScreen,
24 public ui::DisplayConfigurator::Observer { 24 public ui::DisplayConfigurator::Observer {
25 public: 25 public:
26 PlatformScreenImplOzone(); 26 PlatformScreenImplOzone();
27 ~PlatformScreenImplOzone() override; 27 ~PlatformScreenImplOzone() override;
28 28
29 private: 29 private:
30 // PlatformScreen: 30 // PlatformScreen:
31 void Init() override; // Must not be called until after the ozone platform is 31 void Init(PlatformScreenDelegate* delegate) override;
32 // initialized.
33 void ConfigurePhysicalDisplay(
34 const ConfiguredDisplayCallback& callback) override;
35 int64_t GetPrimaryDisplayId() const override; 32 int64_t GetPrimaryDisplayId() const override;
36 33
37 // ui::DisplayConfigurator::Observer: 34 // ui::DisplayConfigurator::Observer:
38 void OnDisplayModeChanged( 35 void OnDisplayModeChanged(
39 const ui::DisplayConfigurator::DisplayStateList& displays) override; 36 const ui::DisplayConfigurator::DisplayStateList& displays) override;
40 void OnDisplayModeChangeFailed( 37 void OnDisplayModeChangeFailed(
41 const ui::DisplayConfigurator::DisplayStateList& displays, 38 const ui::DisplayConfigurator::DisplayStateList& displays,
42 ui::MultipleDisplayState failed_new_state) override; 39 ui::MultipleDisplayState failed_new_state) override;
43 40
41 PlatformScreenDelegate* delegate_ = nullptr;
44 ui::DisplayConfigurator display_configurator_; 42 ui::DisplayConfigurator display_configurator_;
45 43
46 // TODO(kylechar): These values can/should be replaced by DisplayLayout. 44 // TODO(kylechar): These values can/should be replaced by DisplayLayout.
47 int64_t primary_display_id_ = display::Display::kInvalidDisplayID; 45 int64_t primary_display_id_ = display::Display::kInvalidDisplayID;
48 std::set<uint64_t> displays_; 46 std::set<uint64_t> displays_;
49 gfx::Point next_display_origin_; 47 gfx::Point next_display_origin_;
50 48
51 // Callback for when new displays are configured.
52 ConfiguredDisplayCallback callback_;
53
54 DISALLOW_COPY_AND_ASSIGN(PlatformScreenImplOzone); 49 DISALLOW_COPY_AND_ASSIGN(PlatformScreenImplOzone);
55 }; 50 };
56 51
57 } // namespace display 52 } // namespace display
58 53
59 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ 54 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_
OLDNEW
« no previous file with comments | « services/ui/display/platform_screen_impl.cc ('k') | services/ui/display/platform_screen_impl_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698