| OLD | NEW |
| 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_configuration_controller.h" | 9 #include "ash/display/display_configuration_controller.h" |
| 10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 display_info.bounds_in_native().height(); | 376 display_info.bounds_in_native().height(); |
| 377 | 377 |
| 378 const gfx::Insets overscan_insets = | 378 const gfx::Insets overscan_insets = |
| 379 display_manager->GetOverscanInsets(display.id()); | 379 display_manager->GetOverscanInsets(display.id()); |
| 380 unit->overscan.left = overscan_insets.left(); | 380 unit->overscan.left = overscan_insets.left(); |
| 381 unit->overscan.top = overscan_insets.top(); | 381 unit->overscan.top = overscan_insets.top(); |
| 382 unit->overscan.right = overscan_insets.right(); | 382 unit->overscan.right = overscan_insets.right(); |
| 383 unit->overscan.bottom = overscan_insets.bottom(); | 383 unit->overscan.bottom = overscan_insets.bottom(); |
| 384 } | 384 } |
| 385 | 385 |
| 386 gfx::Screen* DisplayInfoProviderChromeOS::GetActiveScreen() { | |
| 387 return ash::Shell::GetScreen(); | |
| 388 } | |
| 389 | |
| 390 void DisplayInfoProviderChromeOS::EnableUnifiedDesktop(bool enable) { | 386 void DisplayInfoProviderChromeOS::EnableUnifiedDesktop(bool enable) { |
| 391 ash::Shell::GetInstance()->display_manager()->SetUnifiedDesktopEnabled( | 387 ash::Shell::GetInstance()->display_manager()->SetUnifiedDesktopEnabled( |
| 392 enable); | 388 enable); |
| 393 } | 389 } |
| 394 | 390 |
| 395 DisplayInfo DisplayInfoProviderChromeOS::GetAllDisplaysInfo() { | 391 DisplayInfo DisplayInfoProviderChromeOS::GetAllDisplaysInfo() { |
| 396 ash::DisplayManager* display_manager = | 392 ash::DisplayManager* display_manager = |
| 397 ash::Shell::GetInstance()->display_manager(); | 393 ash::Shell::GetInstance()->display_manager(); |
| 398 if (!display_manager->IsInUnifiedMode()) | 394 if (!display_manager->IsInUnifiedMode()) |
| 399 return DisplayInfoProvider::GetAllDisplaysInfo(); | 395 return DisplayInfoProvider::GetAllDisplaysInfo(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 413 } | 409 } |
| 414 return all_displays; | 410 return all_displays; |
| 415 } | 411 } |
| 416 | 412 |
| 417 // static | 413 // static |
| 418 DisplayInfoProvider* DisplayInfoProvider::Create() { | 414 DisplayInfoProvider* DisplayInfoProvider::Create() { |
| 419 return new DisplayInfoProviderChromeOS(); | 415 return new DisplayInfoProviderChromeOS(); |
| 420 } | 416 } |
| 421 | 417 |
| 422 } // namespace extensions | 418 } // namespace extensions |
| OLD | NEW |