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

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

Issue 2230963003: Fix window/display bounds with multiple windows in mus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes. Created 4 years, 4 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 <vector> 11 #include <vector>
11 12
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "services/ui/display/platform_screen.h" 15 #include "services/ui/display/platform_screen.h"
15 #include "ui/display/chromeos/display_configurator.h" 16 #include "ui/display/chromeos/display_configurator.h"
17 #include "ui/display/display.h"
16 18
17 namespace display { 19 namespace display {
18 20
19 // PlatformScreenImplOzone provides the necessary functionality to configure all 21 // PlatformScreenImplOzone provides the necessary functionality to configure all
20 // attached physical displays on the ozone platform. 22 // attached physical displays on the ozone platform.
21 class PlatformScreenImplOzone : public PlatformScreen, 23 class PlatformScreenImplOzone : public PlatformScreen,
22 public ui::DisplayConfigurator::Observer { 24 public ui::DisplayConfigurator::Observer {
23 public: 25 public:
24 PlatformScreenImplOzone(); 26 PlatformScreenImplOzone();
25 ~PlatformScreenImplOzone() override; 27 ~PlatformScreenImplOzone() override;
26 28
27 private: 29 private:
28 // PlatformScreen: 30 // PlatformScreen:
29 void Init() override; // Must not be called until after the ozone platform is 31 void Init() override; // Must not be called until after the ozone platform is
30 // initialized. 32 // initialized.
31 void ConfigurePhysicalDisplay( 33 void ConfigurePhysicalDisplay(
32 const ConfiguredDisplayCallback& callback) override; 34 const ConfiguredDisplayCallback& callback) override;
35 int64_t GetPrimaryDisplayId() const override;
33 36
34 // ui::DisplayConfigurator::Observer: 37 // ui::DisplayConfigurator::Observer:
35 void OnDisplayModeChanged( 38 void OnDisplayModeChanged(
36 const ui::DisplayConfigurator::DisplayStateList& displays) override; 39 const ui::DisplayConfigurator::DisplayStateList& displays) override;
37 void OnDisplayModeChangeFailed( 40 void OnDisplayModeChangeFailed(
38 const ui::DisplayConfigurator::DisplayStateList& displays, 41 const ui::DisplayConfigurator::DisplayStateList& displays,
39 ui::MultipleDisplayState failed_new_state) override; 42 ui::MultipleDisplayState failed_new_state) override;
40 43
41 ui::DisplayConfigurator display_configurator_; 44 ui::DisplayConfigurator display_configurator_;
42 45
43 // Callback to called when new displays are configured. 46 // TODO(kylechar): These values can/should be replaced by DisplayLayout.
47 int64_t primary_display_id_ = display::Display::kInvalidDisplayID;
48 std::set<uint64_t> displays_;
49 gfx::Point next_display_origin_;
50
51 // Callback for when new displays are configured.
44 ConfiguredDisplayCallback callback_; 52 ConfiguredDisplayCallback callback_;
45 53
46 DISALLOW_COPY_AND_ASSIGN(PlatformScreenImplOzone); 54 DISALLOW_COPY_AND_ASSIGN(PlatformScreenImplOzone);
47 }; 55 };
48 56
49 } // namespace display 57 } // namespace display
50 58
51 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ 59 #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