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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 336313011: Android: compute screen orientation type in the RWHV. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock_fullscreen
Patch Set: fix mac build Created 6 years, 5 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <OpenGL/gl.h> 8 #include <OpenGL/gl.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 10
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 blink::WebScreenInfo results; 369 blink::WebScreenInfo results;
370 370
371 results.deviceScaleFactor = static_cast<int>(display.device_scale_factor()); 371 results.deviceScaleFactor = static_cast<int>(display.device_scale_factor());
372 results.depth = NSBitsPerPixelFromDepth([screen depth]); 372 results.depth = NSBitsPerPixelFromDepth([screen depth]);
373 results.depthPerComponent = NSBitsPerSampleFromDepth([screen depth]); 373 results.depthPerComponent = NSBitsPerSampleFromDepth([screen depth]);
374 results.isMonochrome = 374 results.isMonochrome =
375 [[screen colorSpace] colorSpaceModel] == NSGrayColorSpaceModel; 375 [[screen colorSpace] colorSpaceModel] == NSGrayColorSpaceModel;
376 results.rect = display.bounds(); 376 results.rect = display.bounds();
377 results.availableRect = display.work_area(); 377 results.availableRect = display.work_area();
378 results.orientationAngle = display.RotationAsDegree(); 378 results.orientationAngle = display.RotationAsDegree();
379 results.orientationType =
380 content::RenderWidgetHostViewBase::GetOrientationTypeFromDisplay(display);
379 381
380 return results; 382 return results;
381 } 383 }
382 384
383 void RemoveLayerFromSuperlayer( 385 void RemoveLayerFromSuperlayer(
384 base::scoped_nsobject<CompositingIOSurfaceLayer> layer) { 386 base::scoped_nsobject<CompositingIOSurfaceLayer> layer) {
385 // Disable the fade-out animation as the layer is removed. 387 // Disable the fade-out animation as the layer is removed.
386 ScopedCAActionDisabler disabler; 388 ScopedCAActionDisabler disabler;
387 [layer removeFromSuperlayer]; 389 [layer removeFromSuperlayer];
388 } 390 }
(...skipping 3578 matching lines...) Expand 10 before | Expand all | Expand 10 after
3967 3969
3968 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3970 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3969 // regions that are not draggable. (See ControlRegionView in 3971 // regions that are not draggable. (See ControlRegionView in
3970 // native_app_window_cocoa.mm). This requires the render host view to be 3972 // native_app_window_cocoa.mm). This requires the render host view to be
3971 // draggable by default. 3973 // draggable by default.
3972 - (BOOL)mouseDownCanMoveWindow { 3974 - (BOOL)mouseDownCanMoveWindow {
3973 return YES; 3975 return YES;
3974 } 3976 }
3975 3977
3976 @end 3978 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698