| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 5 #ifndef CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
| 6 #define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 6 #define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 // add/remove events. Note that Output add/remove events are sent in response | 372 // add/remove events. Note that Output add/remove events are sent in response |
| 373 // to our own reconfiguration operations so spurious events are common. | 373 // to our own reconfiguration operations so spurious events are common. |
| 374 // Spurious events will have no effect. | 374 // Spurious events will have no effect. |
| 375 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; | 375 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; |
| 376 | 376 |
| 377 // Overridden from base::MessagePumpObserver: | 377 // Overridden from base::MessagePumpObserver: |
| 378 virtual base::EventStatus WillProcessEvent( | 378 virtual base::EventStatus WillProcessEvent( |
| 379 const base::NativeEvent& event) OVERRIDE; | 379 const base::NativeEvent& event) OVERRIDE; |
| 380 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; | 380 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; |
| 381 | 381 |
| 382 // Called when a casting session is started or stopped. |
| 383 void OnCastingSessionStartedOrStopped(bool started); |
| 384 |
| 382 void AddObserver(Observer* observer); | 385 void AddObserver(Observer* observer); |
| 383 void RemoveObserver(Observer* observer); | 386 void RemoveObserver(Observer* observer); |
| 384 | 387 |
| 385 // Sets all the displays into pre-suspend mode; usually this means | 388 // Sets all the displays into pre-suspend mode; usually this means |
| 386 // configure them for their resume state. This allows faster resume on | 389 // configure them for their resume state. This allows faster resume on |
| 387 // machines where display configuration is slow. | 390 // machines where display configuration is slow. |
| 388 void SuspendDisplays(); | 391 void SuspendDisplays(); |
| 389 | 392 |
| 390 // Reprobes displays to handle changes made while the system was | 393 // Reprobes displays to handle changes made while the system was |
| 391 // suspended. | 394 // suspended. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 int frame_buffer_height); | 499 int frame_buffer_height); |
| 497 | 500 |
| 498 // Returns the ratio between mirrored mode area and native mode area: | 501 // Returns the ratio between mirrored mode area and native mode area: |
| 499 // (mirror_mode_width * mirrow_mode_height) / (native_width * native_height) | 502 // (mirror_mode_width * mirrow_mode_height) / (native_width * native_height) |
| 500 float GetMirroredDisplayAreaRatio( | 503 float GetMirroredDisplayAreaRatio( |
| 501 const OutputConfigurator::OutputSnapshot& output); | 504 const OutputConfigurator::OutputSnapshot& output); |
| 502 | 505 |
| 503 // Applies output protections according to requests. | 506 // Applies output protections according to requests. |
| 504 bool ApplyProtections(const DisplayProtections& requests); | 507 bool ApplyProtections(const DisplayProtections& requests); |
| 505 | 508 |
| 509 // Sends the current projecting state to power manager. |
| 510 void SendProjectingStateToPowerManager(); |
| 511 |
| 506 StateController* state_controller_; | 512 StateController* state_controller_; |
| 507 SoftwareMirroringController* mirroring_controller_; | 513 SoftwareMirroringController* mirroring_controller_; |
| 508 scoped_ptr<Delegate> delegate_; | 514 scoped_ptr<Delegate> delegate_; |
| 509 | 515 |
| 510 // Used to enable modes which rely on panel fitting. | 516 // Used to enable modes which rely on panel fitting. |
| 511 bool is_panel_fitting_enabled_; | 517 bool is_panel_fitting_enabled_; |
| 512 | 518 |
| 513 // Key of the map is the touch display's id, and the value of the map is the | 519 // Key of the map is the touch display's id, and the value of the map is the |
| 514 // touch display's area ratio in mirror mode defined as : | 520 // touch display's area ratio in mirror mode defined as : |
| 515 // mirror_mode_area / native_mode_area. | 521 // mirror_mode_area / native_mode_area. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 544 // The timer to delay configuring outputs. See also the comments in | 550 // The timer to delay configuring outputs. See also the comments in |
| 545 // Dispatch(). | 551 // Dispatch(). |
| 546 scoped_ptr<base::OneShotTimer<OutputConfigurator> > configure_timer_; | 552 scoped_ptr<base::OneShotTimer<OutputConfigurator> > configure_timer_; |
| 547 | 553 |
| 548 // Id for next output protection client. | 554 // Id for next output protection client. |
| 549 OutputProtectionClientId next_output_protection_client_id_; | 555 OutputProtectionClientId next_output_protection_client_id_; |
| 550 | 556 |
| 551 // Output protection requests of each client. | 557 // Output protection requests of each client. |
| 552 ProtectionRequests client_protection_requests_; | 558 ProtectionRequests client_protection_requests_; |
| 553 | 559 |
| 560 // Number of outstanding casting sessions. |
| 561 int casting_session_count_; |
| 562 |
| 554 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); | 563 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); |
| 555 }; | 564 }; |
| 556 | 565 |
| 557 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList; | 566 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList; |
| 558 | 567 |
| 559 } // namespace chromeos | 568 } // namespace chromeos |
| 560 | 569 |
| 561 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 570 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
| OLD | NEW |