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

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

Issue 296183002: Merge 271252 "Fix HDCP in mirror mode." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1985/src/
Patch Set: 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 gfx::Size* size) const = 0; 87 gfx::Size* size) const = 0;
88 }; 88 };
89 89
90 // Interface for classes that implement software based mirroring. 90 // Interface for classes that implement software based mirroring.
91 class SoftwareMirroringController { 91 class SoftwareMirroringController {
92 public: 92 public:
93 virtual ~SoftwareMirroringController() {} 93 virtual ~SoftwareMirroringController() {}
94 94
95 // Called when the hardware mirroring failed. 95 // Called when the hardware mirroring failed.
96 virtual void SetSoftwareMirroring(bool enabled) = 0; 96 virtual void SetSoftwareMirroring(bool enabled) = 0;
97 virtual bool SoftwareMirroringEnabled() const = 0;
97 }; 98 };
98 99
99 class TouchscreenDelegate { 100 class TouchscreenDelegate {
100 public: 101 public:
101 virtual ~TouchscreenDelegate() {} 102 virtual ~TouchscreenDelegate() {}
102 103
103 // Searches for touchscreens among input devices, 104 // Searches for touchscreens among input devices,
104 // and tries to match them up to screens in |displays|. 105 // and tries to match them up to screens in |displays|.
105 // |displays| is an array of detected screens. 106 // |displays| is an array of detected screens.
106 // If a touchscreen with same resolution as a display's native mode 107 // If a touchscreen with same resolution as a display's native mode
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 315
315 // Returns the display state that should be used with |cached_displays_| while 316 // Returns the display state that should be used with |cached_displays_| while
316 // in |power_state|. 317 // in |power_state|.
317 MultipleDisplayState ChooseDisplayState( 318 MultipleDisplayState ChooseDisplayState(
318 chromeos::DisplayPowerState power_state) const; 319 chromeos::DisplayPowerState power_state) const;
319 320
320 // Returns the ratio between mirrored mode area and native mode area: 321 // Returns the ratio between mirrored mode area and native mode area:
321 // (mirror_mode_width * mirrow_mode_height) / (native_width * native_height) 322 // (mirror_mode_width * mirrow_mode_height) / (native_width * native_height)
322 float GetMirroredDisplayAreaRatio(const DisplayState& display); 323 float GetMirroredDisplayAreaRatio(const DisplayState& display);
323 324
325 // Returns true if in either hardware or software mirroring mode.
326 bool IsMirroring() const;
327
324 // Applies display protections according to requests. 328 // Applies display protections according to requests.
325 bool ApplyProtections(const ContentProtections& requests); 329 bool ApplyProtections(const ContentProtections& requests);
326 330
327 StateController* state_controller_; 331 StateController* state_controller_;
328 SoftwareMirroringController* mirroring_controller_; 332 SoftwareMirroringController* mirroring_controller_;
329 scoped_ptr<NativeDisplayDelegate> native_display_delegate_; 333 scoped_ptr<NativeDisplayDelegate> native_display_delegate_;
330 scoped_ptr<TouchscreenDelegate> touchscreen_delegate_; 334 scoped_ptr<TouchscreenDelegate> touchscreen_delegate_;
331 335
332 // Used to enable modes which rely on panel fitting. 336 // Used to enable modes which rely on panel fitting.
333 bool is_panel_fitting_enabled_; 337 bool is_panel_fitting_enabled_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 374
371 // Display protection requests of each client. 375 // Display protection requests of each client.
372 ProtectionRequests client_protection_requests_; 376 ProtectionRequests client_protection_requests_;
373 377
374 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); 378 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator);
375 }; 379 };
376 380
377 } // namespace ui 381 } // namespace ui
378 382
379 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 383 #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