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

Side by Side Diff: ash/display/projecting_observer_chromeos.cc

Issue 192483007: Move chromeos/display/* to ui/display/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include display.gyp into ChromeOS builds only Created 6 years, 9 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
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 #include "ash/display/projecting_observer_chromeos.h" 5 #include "ash/display/projecting_observer_chromeos.h"
6 6
7 #include "chromeos/dbus/dbus_thread_manager.h" 7 #include "chromeos/dbus/dbus_thread_manager.h"
8 #include "chromeos/dbus/power_manager_client.h" 8 #include "chromeos/dbus/power_manager_client.h"
9 9
10 namespace ash { 10 namespace ash {
11 11
12 namespace internal { 12 namespace internal {
13 13
14 ProjectingObserver::ProjectingObserver() 14 ProjectingObserver::ProjectingObserver()
15 : has_internal_output_(false), 15 : has_internal_output_(false),
16 output_count_(0), 16 output_count_(0),
17 casting_session_count_(0) {} 17 casting_session_count_(0) {}
18 18
19 ProjectingObserver::~ProjectingObserver() {} 19 ProjectingObserver::~ProjectingObserver() {}
20 20
21 void ProjectingObserver::OnDisplayModeChanged( 21 void ProjectingObserver::OnDisplayModeChanged(
22 const std::vector<chromeos::OutputConfigurator::OutputSnapshot>& outputs) { 22 const std::vector<ui::OutputConfigurator::OutputSnapshot>& outputs) {
23 has_internal_output_ = false; 23 has_internal_output_ = false;
24 output_count_ = outputs.size(); 24 output_count_ = outputs.size();
25 25
26 for (size_t i = 0; i < outputs.size(); ++i) { 26 for (size_t i = 0; i < outputs.size(); ++i) {
27 if (outputs[i].type == ui::OUTPUT_TYPE_INTERNAL) { 27 if (outputs[i].type == ui::OUTPUT_TYPE_INTERNAL) {
28 has_internal_output_ = true; 28 has_internal_output_ = true;
29 break; 29 break;
30 } 30 }
31 } 31 }
32 32
(...skipping 19 matching lines...) Expand all
52 bool projecting = has_internal_output_ && 52 bool projecting = has_internal_output_ &&
53 (output_count_ + casting_session_count_ > 1); 53 (output_count_ + casting_session_count_ > 1);
54 54
55 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->SetIsProjecting( 55 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->SetIsProjecting(
56 projecting); 56 projecting);
57 } 57 }
58 58
59 } // namespace internal 59 } // namespace internal
60 60
61 } // namespace ash 61 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/projecting_observer_chromeos.h ('k') | ash/display/projecting_observer_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698