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
3 // found in the LICENSE file.
5 #ifndef ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_
6 #define ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_
8 #include "ash/ash_export.h"
9 #include "ui/display/chromeos/display_configurator.h"
13 class ASH_EXPORT ProjectingObserver
: public ui::DisplayConfigurator::Observer
{
16 virtual ~ProjectingObserver();
18 // Called when a casting session is started or stopped.
19 void OnCastingSessionStartedOrStopped(bool started
);
21 // DisplayConfigurator::Observer implementation:
22 virtual void OnDisplayModeChanged(
23 const ui::DisplayConfigurator::DisplayStateList
& outputs
) OVERRIDE
;
26 // Sends the current projecting state to power manager.
27 void SetIsProjecting();
29 // True if at least one output is internal. This value is updated when
30 // |OnDisplayModeChanged| is called.
31 bool has_internal_output_
;
33 // Keeps track of the number of connected outputs.
36 // Number of outstanding casting sessions.
37 int casting_session_count_
;
39 DISALLOW_COPY_AND_ASSIGN(ProjectingObserver
);
44 #endif // ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_