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

Side by Side Diff: chrome/browser/cocoa/base_view.mm

Issue 150104: Converts BaseView to be non-opaque, which will fix drawing of... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents_view_mac.mm » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/cocoa/base_view.h" 5 #include "chrome/browser/cocoa/base_view.h"
6 6
7 @implementation BaseView 7 @implementation BaseView
8 8
9 - (id)initWithFrame:(NSRect)frame { 9 - (id)initWithFrame:(NSRect)frame {
10 self = [super initWithFrame:frame]; 10 self = [super initWithFrame:frame];
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 - (void)keyDown:(NSEvent *)theEvent { 87 - (void)keyDown:(NSEvent *)theEvent {
88 [self keyEvent:theEvent]; 88 [self keyEvent:theEvent];
89 } 89 }
90 90
91 - (void)keyUp:(NSEvent *)theEvent { 91 - (void)keyUp:(NSEvent *)theEvent {
92 [self keyEvent:theEvent]; 92 [self keyEvent:theEvent];
93 } 93 }
94 94
95 - (BOOL)isOpaque {
96 return YES;
97 }
98
99 - (gfx::Rect)NSRectToRect:(NSRect)rect { 95 - (gfx::Rect)NSRectToRect:(NSRect)rect {
100 gfx::Rect new_rect(NSRectToCGRect(rect)); 96 gfx::Rect new_rect(NSRectToCGRect(rect));
101 new_rect.set_y([self bounds].size.height - new_rect.y() - new_rect.height()); 97 new_rect.set_y([self bounds].size.height - new_rect.y() - new_rect.height());
102 return new_rect; 98 return new_rect;
103 } 99 }
104 100
105 - (NSRect)RectToNSRect:(gfx::Rect)rect { 101 - (NSRect)RectToNSRect:(gfx::Rect)rect {
106 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect())); 102 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect()));
107 new_rect.origin.y = 103 new_rect.origin.y =
108 [self bounds].size.height - new_rect.origin.y - new_rect.size.height; 104 [self bounds].size.height - new_rect.origin.y - new_rect.size.height;
109 return new_rect; 105 return new_rect;
110 } 106 }
111 107
112 @end 108 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698