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

Side by Side Diff: chrome/browser/extensions/display_info_provider_chromeos.cc

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: . Created 4 years, 11 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
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 "chrome/browser/extensions/display_info_provider_chromeos.h" 5 #include "chrome/browser/extensions/display_info_provider_chromeos.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/display/window_tree_host_manager.h" 10 #include "ash/display/window_tree_host_manager.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 display_info.bounds_in_native().height(); 375 display_info.bounds_in_native().height();
376 376
377 const gfx::Insets overscan_insets = 377 const gfx::Insets overscan_insets =
378 display_manager->GetOverscanInsets(display.id()); 378 display_manager->GetOverscanInsets(display.id());
379 unit->overscan.left = overscan_insets.left(); 379 unit->overscan.left = overscan_insets.left();
380 unit->overscan.top = overscan_insets.top(); 380 unit->overscan.top = overscan_insets.top();
381 unit->overscan.right = overscan_insets.right(); 381 unit->overscan.right = overscan_insets.right();
382 unit->overscan.bottom = overscan_insets.bottom(); 382 unit->overscan.bottom = overscan_insets.bottom();
383 } 383 }
384 384
385 gfx::Screen* DisplayInfoProviderChromeOS::GetActiveScreen() {
386 return ash::Shell::GetScreen();
387 }
388
389 void DisplayInfoProviderChromeOS::EnableUnifiedDesktop(bool enable) { 385 void DisplayInfoProviderChromeOS::EnableUnifiedDesktop(bool enable) {
390 ash::Shell::GetInstance()->display_manager()->SetUnifiedDesktopEnabled( 386 ash::Shell::GetInstance()->display_manager()->SetUnifiedDesktopEnabled(
391 enable); 387 enable);
392 } 388 }
393 389
394 DisplayInfo DisplayInfoProviderChromeOS::GetAllDisplaysInfo() { 390 DisplayInfo DisplayInfoProviderChromeOS::GetAllDisplaysInfo() {
395 ash::DisplayManager* display_manager = 391 ash::DisplayManager* display_manager =
396 ash::Shell::GetInstance()->display_manager(); 392 ash::Shell::GetInstance()->display_manager();
397 if (!display_manager->IsInUnifiedMode()) 393 if (!display_manager->IsInUnifiedMode())
398 return DisplayInfoProvider::GetAllDisplaysInfo(); 394 return DisplayInfoProvider::GetAllDisplaysInfo();
(...skipping 13 matching lines...) Expand all
412 } 408 }
413 return all_displays; 409 return all_displays;
414 } 410 }
415 411
416 // static 412 // static
417 DisplayInfoProvider* DisplayInfoProvider::Create() { 413 DisplayInfoProvider* DisplayInfoProvider::Create() {
418 return new DisplayInfoProviderChromeOS(); 414 return new DisplayInfoProviderChromeOS();
419 } 415 }
420 416
421 } // namespace extensions 417 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698