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

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

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/display_controller.cc ('k') | ash/display/display_manager_unittest.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 "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/display/display_info.h" 8 #include "ash/display/display_info.h"
9 #include "ash/display/display_layout_store.h" 9 #include "ash/display/display_layout_store.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 #if defined(USE_X11) 283 #if defined(USE_X11)
284 void GetPrimaryAndSeconary(aura::Window** primary, 284 void GetPrimaryAndSeconary(aura::Window** primary,
285 aura::Window** secondary) { 285 aura::Window** secondary) {
286 *primary = Shell::GetPrimaryRootWindow(); 286 *primary = Shell::GetPrimaryRootWindow();
287 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 287 aura::Window::Windows root_windows = Shell::GetAllRootWindows();
288 *secondary = root_windows[0] == *primary ? root_windows[1] : root_windows[0]; 288 *secondary = root_windows[0] == *primary ? root_windows[1] : root_windows[0];
289 } 289 }
290 290
291 std::string GetXWindowName(aura::RootWindow* window) { 291 std::string GetXWindowName(aura::RootWindow* window) {
292 char* name = NULL; 292 char* name = NULL;
293 XFetchName(gfx::GetXDisplay(), window->GetAcceleratedWidget(), &name); 293 XFetchName(gfx::GetXDisplay(), window->host()->GetAcceleratedWidget(), &name);
294 std::string ret(name); 294 std::string ret(name);
295 XFree(name); 295 XFree(name);
296 return ret; 296 return ret;
297 } 297 }
298 #endif 298 #endif
299 299
300 } // namespace 300 } // namespace
301 301
302 typedef test::AshTestBase DisplayControllerTest; 302 typedef test::AshTestBase DisplayControllerTest;
303 303
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 EXPECT_EQ("aura_root_x", GetXWindowName(secondary->GetDispatcher())); 1284 EXPECT_EQ("aura_root_x", GetXWindowName(secondary->GetDispatcher()));
1285 1285
1286 // Switching back to single display. 1286 // Switching back to single display.
1287 UpdateDisplay("300x400"); 1287 UpdateDisplay("300x400");
1288 EXPECT_EQ("aura_root_0", GetXWindowName( 1288 EXPECT_EQ("aura_root_0", GetXWindowName(
1289 Shell::GetPrimaryRootWindow()->GetDispatcher())); 1289 Shell::GetPrimaryRootWindow()->GetDispatcher()));
1290 } 1290 }
1291 #endif 1291 #endif
1292 1292
1293 } // namespace ash 1293 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_controller.cc ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698