| OLD | NEW |
| 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 "content/browser/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 display::Screen* screen = display::Screen::GetScreen(); | 704 display::Screen* screen = display::Screen::GetScreen(); |
| 705 const display::Display display = window | 705 const display::Display display = window |
| 706 ? screen->GetDisplayNearestWindow(window) | 706 ? screen->GetDisplayNearestWindow(window) |
| 707 : screen->GetPrimaryDisplay(); | 707 : screen->GetPrimaryDisplay(); |
| 708 results->rect = display.bounds(); | 708 results->rect = display.bounds(); |
| 709 results->available_rect = display.work_area(); | 709 results->available_rect = display.work_area(); |
| 710 results->depth = display.color_depth(); | 710 results->depth = display.color_depth(); |
| 711 results->depth_per_component = display.depth_per_component(); | 711 results->depth_per_component = display.depth_per_component(); |
| 712 results->is_monochrome = display.is_monochrome(); | 712 results->is_monochrome = display.is_monochrome(); |
| 713 results->device_scale_factor = display.device_scale_factor(); | 713 results->device_scale_factor = display.device_scale_factor(); |
| 714 results->icc_profile = gfx::ICCProfile::FromBestMonitor(); | 714 results->icc_profile = display.icc_profile(); |
| 715 if (!results->icc_profile.IsValid()) | |
| 716 gfx::ColorSpace::CreateSRGB().GetICCProfile(&results->icc_profile); | |
| 717 DCHECK(results->icc_profile.IsValid()); | 715 DCHECK(results->icc_profile.IsValid()); |
| 718 | 716 |
| 719 // The Display rotation and the ScreenInfo orientation are not the same | 717 // The Display rotation and the ScreenInfo orientation are not the same |
| 720 // angle. The former is the physical display rotation while the later is the | 718 // angle. The former is the physical display rotation while the later is the |
| 721 // rotation required by the content to be shown properly on the screen, in | 719 // rotation required by the content to be shown properly on the screen, in |
| 722 // other words, relative to the physical display. | 720 // other words, relative to the physical display. |
| 723 results->orientation_angle = display.RotationAsDegree(); | 721 results->orientation_angle = display.RotationAsDegree(); |
| 724 if (results->orientation_angle == 90) | 722 if (results->orientation_angle == 90) |
| 725 results->orientation_angle = 270; | 723 results->orientation_angle = 270; |
| 726 else if (results->orientation_angle == 270) | 724 else if (results->orientation_angle == 270) |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 bool allow_multiple_selection) { | 1343 bool allow_multiple_selection) { |
| 1346 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; | 1344 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; |
| 1347 } | 1345 } |
| 1348 | 1346 |
| 1349 void WebContentsViewAura::HidePopupMenu() { | 1347 void WebContentsViewAura::HidePopupMenu() { |
| 1350 NOTIMPLEMENTED(); | 1348 NOTIMPLEMENTED(); |
| 1351 } | 1349 } |
| 1352 #endif | 1350 #endif |
| 1353 | 1351 |
| 1354 } // namespace content | 1352 } // namespace content |
| OLD | NEW |