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

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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 static const ContentProtectionClientId kInvalidClientId = 0;
49 49
50 typedef base::Callback<void(bool /* success */)> ConfigurationCallback; 50 typedef base::Callback<void(bool /* success */)> ConfigurationCallback;
51 51
52 typedef base::Callback<void(bool /* success */)> EnableProtectionCallback; 52 typedef base::Callback<void(bool /* success */)> EnableProtectionCallback;
53 53
54 struct QueryProtectionResponse { 54 // link_mask: The type of connected display links, which is a bitmask of
55 // True if the query succeeded, false otherwise. 55 // DisplayConnectionType values.
56 bool success = false; 56 // protection_mask: The desired protection methods, which is a bitmask of the
57 57 // ContentProtectionMethod values.
58 // The type of connected display links, which is a bitmask of 58 typedef base::Callback<void(bool /* success */,
rjkroege 2017/02/09 00:44:43 using in new code?
Peng 2017/02/10 15:57:02 Yes. To use the same signature with mojo interface
59 // DisplayConnectionType values. 59 uint32_t /* link_mask */,
60 uint32_t link_mask = 0; 60 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; 61 QueryProtectionCallback;
69 62
70 typedef base::Callback<void(bool /* success */)> DisplayControlCallback; 63 typedef base::Callback<void(bool /* success */)> DisplayControlCallback;
71 64
72 typedef std::vector<DisplaySnapshot*> DisplayStateList; 65 typedef std::vector<DisplaySnapshot*> DisplayStateList;
73 66
74 // Mapping a display_id to a protection request bitmask. 67 // Mapping a display_id to a protection request bitmask.
75 typedef std::map<int64_t, uint32_t> ContentProtections; 68 typedef std::map<int64_t, uint32_t> ContentProtections;
76 69
77 class Observer { 70 class Observer {
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 477
485 // This must be the last variable. 478 // This must be the last variable.
486 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; 479 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_;
487 480
488 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); 481 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator);
489 }; 482 };
490 483
491 } // namespace display 484 } // namespace display
492 485
493 #endif // UI_DISPLAY_MANAGER_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 486 #endif // UI_DISPLAY_MANAGER_CHROMEOS_DISPLAY_CONFIGURATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698