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

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

Issue 2688413007: Add display::GetDisplayNearestView (Closed)
Patch Set: add missing files Created 3 years, 10 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
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 <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 #import <objc/runtime.h> 8 #import <objc/runtime.h>
9 #include <OpenGL/gl.h> 9 #include <OpenGL/gl.h>
10 #include <QuartzCore/QuartzCore.h> 10 #include <QuartzCore/QuartzCore.h>
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 pepper_fullscreen_window_.reset(); 684 pepper_fullscreen_window_.reset();
685 } 685 }
686 686
687 int RenderWidgetHostViewMac::window_number() const { 687 int RenderWidgetHostViewMac::window_number() const {
688 NSWindow* window = [cocoa_view_ window]; 688 NSWindow* window = [cocoa_view_ window];
689 if (!window) 689 if (!window)
690 return -1; 690 return -1;
691 return [window windowNumber]; 691 return [window windowNumber];
692 } 692 }
693 693
694 float RenderWidgetHostViewMac::ViewScaleFactor() const { 694 float RenderWidgetHostViewMac::ViewScaleFactor() const {
tapted 2017/02/15 00:36:10 This method should just be deleted. Callers should
Jinsuk Kim 2017/02/16 10:11:25 Done.
695 return ui::GetScaleFactorForNativeView(cocoa_view_); 695 return GetScaleFactorForNativeView(cocoa_view_);
696 } 696 }
697 697
698 void RenderWidgetHostViewMac::UpdateDisplayLink() { 698 void RenderWidgetHostViewMac::UpdateDisplayLink() {
699 static bool is_vsync_disabled = 699 static bool is_vsync_disabled =
700 base::CommandLine::ForCurrentProcess()->HasSwitch( 700 base::CommandLine::ForCurrentProcess()->HasSwitch(
701 switches::kDisableGpuVsync); 701 switches::kDisableGpuVsync);
702 if (is_vsync_disabled) 702 if (is_vsync_disabled)
703 return; 703 return;
704 704
705 NSScreen* screen = [[cocoa_view_ window] screen]; 705 NSScreen* screen = [[cocoa_view_ window] screen];
(...skipping 2767 matching lines...) Expand 10 before | Expand all | Expand 10 after
3473 3473
3474 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3474 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3475 // regions that are not draggable. (See ControlRegionView in 3475 // regions that are not draggable. (See ControlRegionView in
3476 // native_app_window_cocoa.mm). This requires the render host view to be 3476 // native_app_window_cocoa.mm). This requires the render host view to be
3477 // draggable by default. 3477 // draggable by default.
3478 - (BOOL)mouseDownCanMoveWindow { 3478 - (BOOL)mouseDownCanMoveWindow {
3479 return YES; 3479 return YES;
3480 } 3480 }
3481 3481
3482 @end 3482 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698