Chromium Code Reviews| 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 display.color_space().GetICCProfile(&results->icc_profile); |
|
hubbe
2017/06/23 21:31:52
seems this would be easier to read if said somethi
ccameron
2017/06/23 22:44:10
I didn't change this instance because it affects I
| |
| 715 if (!results->icc_profile.IsValid()) | |
| 716 gfx::ColorSpace::CreateSRGB().GetICCProfile(&results->icc_profile); | |
| 717 DCHECK(results->icc_profile.IsValid()); | |
| 718 | 715 |
| 719 // The Display rotation and the ScreenInfo orientation are not the same | 716 // 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 | 717 // 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 | 718 // rotation required by the content to be shown properly on the screen, in |
| 722 // other words, relative to the physical display. | 719 // other words, relative to the physical display. |
| 723 results->orientation_angle = display.RotationAsDegree(); | 720 results->orientation_angle = display.RotationAsDegree(); |
| 724 if (results->orientation_angle == 90) | 721 if (results->orientation_angle == 90) |
| 725 results->orientation_angle = 270; | 722 results->orientation_angle = 270; |
| 726 else if (results->orientation_angle == 270) | 723 else if (results->orientation_angle == 270) |
| 727 results->orientation_angle = 90; | 724 results->orientation_angle = 90; |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1345 bool allow_multiple_selection) { | 1342 bool allow_multiple_selection) { |
| 1346 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; | 1343 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; |
| 1347 } | 1344 } |
| 1348 | 1345 |
| 1349 void WebContentsViewAura::HidePopupMenu() { | 1346 void WebContentsViewAura::HidePopupMenu() { |
| 1350 NOTIMPLEMENTED(); | 1347 NOTIMPLEMENTED(); |
| 1351 } | 1348 } |
| 1352 #endif | 1349 #endif |
| 1353 | 1350 |
| 1354 } // namespace content | 1351 } // namespace content |
| OLD | NEW |