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

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

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new usage of scale in FastShowPickler Created 7 years, 2 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 | Annotate | Revision Log
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 <QuartzCore/QuartzCore.h> 8 #include <QuartzCore/QuartzCore.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 @selector(windowDidChangeBackingProperties:), 156 @selector(windowDidChangeBackingProperties:),
157 NO, 157 NO,
158 YES); 158 YES);
159 159
160 // If the protocol does not contain the method, the returned method 160 // If the protocol does not contain the method, the returned method
161 // description is {NULL, NULL} 161 // description is {NULL, NULL}
162 return methodDescription.name != NULL || methodDescription.types != NULL; 162 return methodDescription.name != NULL || methodDescription.types != NULL;
163 } 163 }
164 164
165 static float ScaleFactor(NSView* view) { 165 static float ScaleFactor(NSView* view) {
166 return ui::GetScaleFactorScale(ui::GetScaleFactorForNativeView(view)); 166 return ui::GetImageScale(ui::GetScaleFactorForNativeView(view));
167 } 167 }
168 168
169 // Private methods: 169 // Private methods:
170 @interface RenderWidgetHostViewCocoa () 170 @interface RenderWidgetHostViewCocoa ()
171 @property(nonatomic, assign) NSRange selectedRange; 171 @property(nonatomic, assign) NSRange selectedRange;
172 @property(nonatomic, assign) NSRange markedRange; 172 @property(nonatomic, assign) NSRange markedRange;
173 @property(nonatomic, assign) 173 @property(nonatomic, assign)
174 NSObject<RenderWidgetHostViewMacDelegate>* delegate; 174 NSObject<RenderWidgetHostViewMacDelegate>* delegate;
175 175
176 + (BOOL)shouldAutohideCursorForEvent:(NSEvent*)event; 176 + (BOOL)shouldAutohideCursorForEvent:(NSEvent*)event;
(...skipping 3669 matching lines...) Expand 10 before | Expand all | Expand 10 after
3846 return YES; 3846 return YES;
3847 } 3847 }
3848 3848
3849 - (BOOL)isOpaque { 3849 - (BOOL)isOpaque {
3850 if (renderWidgetHostView_->use_core_animation_) 3850 if (renderWidgetHostView_->use_core_animation_)
3851 return YES; 3851 return YES;
3852 return [super isOpaque]; 3852 return [super isOpaque];
3853 } 3853 }
3854 3854
3855 @end 3855 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698