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

Side by Side Diff: services/native_viewport/ozone/display_manager.h

Issue 1309273005: native_viewport support for ozone (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 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
(Empty)
1 // Copyright 2015 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 #ifndef SERVICES_NATIVE_VIEWPORT_DISPLAY_MANAGER_H_
6 #define SERVICES_NATIVE_VIEWPORT_DISPLAY_MANAGER_H_
7
8 #include <vector>
9 #include "base/memory/weak_ptr.h"
10 #include "ui/display/types/native_display_delegate.h"
11 #include "ui/display/types/native_display_observer.h"
12 #include "ui/gfx/geometry/rect.h"
13
14 namespace native_viewport {
15
16 class DisplayManager : public ui::NativeDisplayObserver {
17 public:
18 DisplayManager();
19 ~DisplayManager() override;
20
21 private:
22 void OnDisplaysAcquired(const std::vector<ui::DisplaySnapshot*>& displays);
23 void OnDisplayConfigured(const gfx::Rect& bounds, bool success);
24
25 // ui::NativeDisplayObserver
26 void OnConfigurationChanged() override;
27
28 scoped_ptr<ui::NativeDisplayDelegate> delegate_;
29
30 // Flags used to keep track of the current state of display configuration.
31 //
32 // True if configuring the displays. In this case a new display configuration
33 // isn't started.
34 bool is_configuring_;
35
36 // If |is_configuring_| is true and another display configuration event
37 // happens, the event is deferred. This is set to true and a display
38 // configuration will be scheduled after the current one finishes.
39 bool should_configure_;
40
41 base::WeakPtrFactory<DisplayManager> weak_factory_;
42
43 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
44 };
45
46 } // namespace native_viewport
47
48 #endif
OLDNEW
« no previous file with comments | « services/native_viewport/ozone/app_delegate_ozone.cc ('k') | services/native_viewport/ozone/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698