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

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

Issue 684783004: Prefix CommandLine usage with base namespace (Part 4: ash/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 1 month 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
« no previous file with comments | « ash/audio/sounds.cc ('k') | ash/display/display_layout_store.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 (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 #include "ash/display/display_controller.h" 5 #include "ash/display/display_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 // outlives the host. 739 // outlives the host.
740 host->AddObserver(this); 740 host->AddObserver(this);
741 InitRootWindowSettings(host->window())->display_id = display.id(); 741 InitRootWindowSettings(host->window())->display_id = display.id();
742 host->InitHost(); 742 host->InitHost();
743 743
744 window_tree_hosts_[display.id()] = ash_host; 744 window_tree_hosts_[display.id()] = ash_host;
745 SetDisplayPropertiesOnHost(ash_host, display); 745 SetDisplayPropertiesOnHost(ash_host, display);
746 746
747 #if defined(OS_CHROMEOS) 747 #if defined(OS_CHROMEOS)
748 static bool force_constrain_pointer_to_root = 748 static bool force_constrain_pointer_to_root =
749 CommandLine::ForCurrentProcess()->HasSwitch( 749 base::CommandLine::ForCurrentProcess()->HasSwitch(
750 switches::kAshConstrainPointerToRoot); 750 switches::kAshConstrainPointerToRoot);
751 if (base::SysInfo::IsRunningOnChromeOS() || force_constrain_pointer_to_root) 751 if (base::SysInfo::IsRunningOnChromeOS() || force_constrain_pointer_to_root)
752 ash_host->ConfineCursorToRootWindow(); 752 ash_host->ConfineCursorToRootWindow();
753 #endif 753 #endif
754 return ash_host; 754 return ash_host;
755 } 755 }
756 756
757 void DisplayController::OnFadeOutForSwapDisplayFinished() { 757 void DisplayController::OnFadeOutForSwapDisplayFinished() {
758 #if defined(OS_CHROMEOS) 758 #if defined(OS_CHROMEOS)
759 SetPrimaryDisplay(ScreenUtil::GetSecondaryDisplay()); 759 SetPrimaryDisplay(ScreenUtil::GetSecondaryDisplay());
(...skipping 17 matching lines...) Expand all
777 std::string name = 777 std::string name =
778 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; 778 root_windows[i] == primary ? "aura_root_0" : "aura_root_x";
779 gfx::AcceleratedWidget xwindow = 779 gfx::AcceleratedWidget xwindow =
780 root_windows[i]->GetHost()->GetAcceleratedWidget(); 780 root_windows[i]->GetHost()->GetAcceleratedWidget();
781 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); 781 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str());
782 } 782 }
783 #endif 783 #endif
784 } 784 }
785 785
786 } // namespace ash 786 } // namespace ash
OLDNEW
« no previous file with comments | « ash/audio/sounds.cc ('k') | ash/display/display_layout_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698