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

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

Issue 224113005: Eliminate ash::internal namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 #include "ui/display/chromeos/display_snapshot.h" 9 #include "ui/display/chromeos/display_snapshot.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 namespace internal {
14
15 ProjectingObserver::ProjectingObserver() 13 ProjectingObserver::ProjectingObserver()
16 : has_internal_output_(false), 14 : has_internal_output_(false),
17 output_count_(0), 15 output_count_(0),
18 casting_session_count_(0) {} 16 casting_session_count_(0) {}
19 17
20 ProjectingObserver::~ProjectingObserver() {} 18 ProjectingObserver::~ProjectingObserver() {}
21 19
22 void ProjectingObserver::OnDisplayModeChanged( 20 void ProjectingObserver::OnDisplayModeChanged(
23 const ui::OutputConfigurator::DisplayStateList& outputs) { 21 const ui::OutputConfigurator::DisplayStateList& outputs) {
24 has_internal_output_ = false; 22 has_internal_output_ = false;
(...skipping 25 matching lines...) Expand all
50 void ProjectingObserver::SetIsProjecting() { 48 void ProjectingObserver::SetIsProjecting() {
51 // "Projecting" is defined as having more than 1 output connected while at 49 // "Projecting" is defined as having more than 1 output connected while at
52 // least one of them is an internal output. 50 // least one of them is an internal output.
53 bool projecting = has_internal_output_ && 51 bool projecting = has_internal_output_ &&
54 (output_count_ + casting_session_count_ > 1); 52 (output_count_ + casting_session_count_ > 1);
55 53
56 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->SetIsProjecting( 54 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->SetIsProjecting(
57 projecting); 55 projecting);
58 } 56 }
59 57
60 } // namespace internal
61
62 } // namespace ash 58 } // 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