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

Side by Side Diff: ui/display/manager/chromeos/display_configurator.h

Issue 2675743002: PPAPI: Make output protection API work with mus+ash (Closed)
Patch Set: Update Created 3 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 UI_DISPLAY_MANAGER_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 5 #ifndef UI_DISPLAY_MANAGER_CHROMEOS_DISPLAY_CONFIGURATOR_H_
6 #define UI_DISPLAY_MANAGER_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 6 #define UI_DISPLAY_MANAGER_CHROMEOS_DISPLAY_CONFIGURATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 27 matching lines...) Expand all
38 class DisplayMode; 38 class DisplayMode;
39 class DisplaySnapshot; 39 class DisplaySnapshot;
40 class NativeDisplayDelegate; 40 class NativeDisplayDelegate;
41 class UpdateDisplayConfigurationTask; 41 class UpdateDisplayConfigurationTask;
42 42
43 // This class interacts directly with the system display configurator. 43 // This class interacts directly with the system display configurator.
44 class DISPLAY_MANAGER_EXPORT DisplayConfigurator 44 class DISPLAY_MANAGER_EXPORT DisplayConfigurator
45 : public NativeDisplayObserver { 45 : public NativeDisplayObserver {
46 public: 46 public:
47 typedef uint64_t ContentProtectionClientId; 47 typedef uint64_t ContentProtectionClientId;
48 static const ContentProtectionClientId kInvalidClientId = 0; 48 enum : ContentProtectionClientId {
49 kInvalidClientId = 0,
sky 2017/02/10 19:24:56 enums use ALL_CAPS style.
Peng 2017/02/10 20:35:47 Done.
50 };
49 51
50 typedef base::Callback<void(bool /* success */)> ConfigurationCallback; 52 typedef base::Callback<void(bool /* success */)> ConfigurationCallback;
51 53
52 typedef base::Callback<void(bool /* success */)> EnableProtectionCallback; 54 typedef base::Callback<void(bool /* success */)> EnableProtectionCallback;
53 55
54 struct QueryProtectionResponse { 56 // link_mask: The type of connected display links, which is a bitmask of
55 // True if the query succeeded, false otherwise. 57 // DisplayConnectionType values.
56 bool success = false; 58 // protection_mask: The desired protection methods, which is a bitmask of the
57 59 // ContentProtectionMethod values.
58 // The type of connected display links, which is a bitmask of 60 typedef base::Callback<void(bool /* success */,
sky 2017/02/10 19:24:56 Use using?
Peng 2017/02/10 20:35:47 Done.
59 // DisplayConnectionType values. 61 uint32_t /* link_mask */,
60 uint32_t link_mask = 0; 62 uint32_t /* protection_mask */)>
61
62 // The desired protection methods, which is a bitmask of the
63 // ContentProtectionMethod values.
64 uint32_t protection_mask = 0;
65 };
66
67 typedef base::Callback<void(const QueryProtectionResponse&)>
68 QueryProtectionCallback; 63 QueryProtectionCallback;
69 64
70 typedef base::Callback<void(bool /* success */)> DisplayControlCallback; 65 typedef base::Callback<void(bool /* success */)> DisplayControlCallback;
71 66
72 typedef std::vector<DisplaySnapshot*> DisplayStateList; 67 typedef std::vector<DisplaySnapshot*> DisplayStateList;
73 68
74 // Mapping a display_id to a protection request bitmask. 69 // Mapping a display_id to a protection request bitmask.
75 typedef std::map<int64_t, uint32_t> ContentProtections; 70 typedef std::map<int64_t, uint32_t> ContentProtections;
76 71
77 class Observer { 72 class Observer {
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 479
485 // This must be the last variable. 480 // This must be the last variable.
486 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; 481 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_;
487 482
488 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); 483 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator);
489 }; 484 };
490 485
491 } // namespace display 486 } // namespace display
492 487
493 #endif // UI_DISPLAY_MANAGER_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 488 #endif // UI_DISPLAY_MANAGER_CHROMEOS_DISPLAY_CONFIGURATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698