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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 ? screen->GetDisplayNearestWindow(window) | 692 ? screen->GetDisplayNearestWindow(window) |
693 : screen->GetPrimaryDisplay(); | 693 : screen->GetPrimaryDisplay(); |
694 results->rect = display.bounds(); | 694 results->rect = display.bounds(); |
695 results->available_rect = display.work_area(); | 695 results->available_rect = display.work_area(); |
696 // TODO(derat|oshima): Don't hardcode this. Get this from display object. | 696 // TODO(derat|oshima): Don't hardcode this. Get this from display object. |
697 results->depth = 24; | 697 results->depth = 24; |
698 results->depth_per_component = 8; | 698 results->depth_per_component = 8; |
699 results->is_monochrome = false; | 699 results->is_monochrome = false; |
700 results->device_scale_factor = display.device_scale_factor(); | 700 results->device_scale_factor = display.device_scale_factor(); |
701 results->icc_profile = gfx::ICCProfile::FromBestMonitor(); | 701 results->icc_profile = gfx::ICCProfile::FromBestMonitor(); |
702 if (results->icc_profile == gfx::ICCProfile()) { | 702 if (!results->icc_profile.IsValid()) |
703 results->icc_profile = | 703 gfx::ColorSpace::CreateSRGB().GetICCProfile(&results->icc_profile); |
704 gfx::ICCProfile::FromColorSpace(gfx::ColorSpace::CreateSRGB()); | 704 DCHECK(results->icc_profile.IsValid()); |
705 } | |
706 | 705 |
707 // The Display rotation and the ScreenInfo orientation are not the same | 706 // The Display rotation and the ScreenInfo orientation are not the same |
708 // angle. The former is the physical display rotation while the later is the | 707 // angle. The former is the physical display rotation while the later is the |
709 // rotation required by the content to be shown properly on the screen, in | 708 // rotation required by the content to be shown properly on the screen, in |
710 // other words, relative to the physical display. | 709 // other words, relative to the physical display. |
711 results->orientation_angle = display.RotationAsDegree(); | 710 results->orientation_angle = display.RotationAsDegree(); |
712 if (results->orientation_angle == 90) | 711 if (results->orientation_angle == 90) |
713 results->orientation_angle = 270; | 712 results->orientation_angle = 270; |
714 else if (results->orientation_angle == 270) | 713 else if (results->orientation_angle == 270) |
715 results->orientation_angle = 90; | 714 results->orientation_angle = 90; |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 bool allow_multiple_selection) { | 1323 bool allow_multiple_selection) { |
1325 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; | 1324 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; |
1326 } | 1325 } |
1327 | 1326 |
1328 void WebContentsViewAura::HidePopupMenu() { | 1327 void WebContentsViewAura::HidePopupMenu() { |
1329 NOTIMPLEMENTED(); | 1328 NOTIMPLEMENTED(); |
1330 } | 1329 } |
1331 #endif | 1330 #endif |
1332 | 1331 |
1333 } // namespace content | 1332 } // namespace content |
OLD | NEW |