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

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

Issue 284853002: Fix HDCP in mirror mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittest build Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/display_manager.cc ('k') | ui/display/chromeos/display_configurator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 5 #ifndef UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_
6 #define UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 6 #define UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 gfx::Size* size) const = 0; 98 gfx::Size* size) const = 0;
99 }; 99 };
100 100
101 // Interface for classes that implement software based mirroring. 101 // Interface for classes that implement software based mirroring.
102 class SoftwareMirroringController { 102 class SoftwareMirroringController {
103 public: 103 public:
104 virtual ~SoftwareMirroringController() {} 104 virtual ~SoftwareMirroringController() {}
105 105
106 // Called when the hardware mirroring failed. 106 // Called when the hardware mirroring failed.
107 virtual void SetSoftwareMirroring(bool enabled) = 0; 107 virtual void SetSoftwareMirroring(bool enabled) = 0;
108 virtual bool SoftwareMirroringEnabled() const = 0;
108 }; 109 };
109 110
110 class TouchscreenDelegate { 111 class TouchscreenDelegate {
111 public: 112 public:
112 virtual ~TouchscreenDelegate() {} 113 virtual ~TouchscreenDelegate() {}
113 114
114 // Searches for touchscreens among input devices, 115 // Searches for touchscreens among input devices,
115 // and tries to match them up to screens in |displays|. 116 // and tries to match them up to screens in |displays|.
116 // |displays| is an array of detected screens. 117 // |displays| is an array of detected screens.
117 // If a touchscreen with same resolution as a display's native mode 118 // If a touchscreen with same resolution as a display's native mode
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // Returns the transformation or identity if computations fail. 348 // Returns the transformation or identity if computations fail.
348 CoordinateTransformation GetExtendedModeCTM( 349 CoordinateTransformation GetExtendedModeCTM(
349 const DisplayState& display, 350 const DisplayState& display,
350 const gfx::Point& new_origin, 351 const gfx::Point& new_origin,
351 const gfx::Size& framebuffer_size); 352 const gfx::Size& framebuffer_size);
352 353
353 // Returns the ratio between mirrored mode area and native mode area: 354 // Returns the ratio between mirrored mode area and native mode area:
354 // (mirror_mode_width * mirrow_mode_height) / (native_width * native_height) 355 // (mirror_mode_width * mirrow_mode_height) / (native_width * native_height)
355 float GetMirroredDisplayAreaRatio(const DisplayState& display); 356 float GetMirroredDisplayAreaRatio(const DisplayState& display);
356 357
358 // Returns true if in either hardware or software mirroring mode.
359 bool IsMirroring() const;
360
357 // Applies display protections according to requests. 361 // Applies display protections according to requests.
358 bool ApplyProtections(const ContentProtections& requests); 362 bool ApplyProtections(const ContentProtections& requests);
359 363
360 StateController* state_controller_; 364 StateController* state_controller_;
361 SoftwareMirroringController* mirroring_controller_; 365 SoftwareMirroringController* mirroring_controller_;
362 scoped_ptr<NativeDisplayDelegate> native_display_delegate_; 366 scoped_ptr<NativeDisplayDelegate> native_display_delegate_;
363 scoped_ptr<TouchscreenDelegate> touchscreen_delegate_; 367 scoped_ptr<TouchscreenDelegate> touchscreen_delegate_;
364 368
365 // Used to enable modes which rely on panel fitting. 369 // Used to enable modes which rely on panel fitting.
366 bool is_panel_fitting_enabled_; 370 bool is_panel_fitting_enabled_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 405
402 // Display protection requests of each client. 406 // Display protection requests of each client.
403 ProtectionRequests client_protection_requests_; 407 ProtectionRequests client_protection_requests_;
404 408
405 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); 409 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator);
406 }; 410 };
407 411
408 } // namespace ui 412 } // namespace ui
409 413
410 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 414 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_
OLDNEW
« no previous file with comments | « ash/display/display_manager.cc ('k') | ui/display/chromeos/display_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698