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

Side by Side Diff: chrome/browser/ui/cocoa/view_id_util.mm

Issue 240093006: CoreAnimation: Fix text anti-aliasing in download shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_omnibox_aa
Patch Set: Fix typo Created 6 years, 8 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 | « chrome/browser/ui/cocoa/view_id_util.h ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/cocoa/view_id_util.h" 5 #import "chrome/browser/ui/cocoa/view_id_util.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } // namespace view_id_util 79 } // namespace view_id_util
80 80
81 @implementation NSView (ViewID) 81 @implementation NSView (ViewID)
82 82
83 - (ViewID)viewID { 83 - (ViewID)viewID {
84 ViewIDMap* map = g_view_id_map.Pointer(); 84 ViewIDMap* map = g_view_id_map.Pointer();
85 ViewIDMap::const_iterator iter = map->find(self); 85 ViewIDMap::const_iterator iter = map->find(self);
86 return iter != map->end() ? iter->second : VIEW_ID_NONE; 86 return iter != map->end() ? iter->second : VIEW_ID_NONE;
87 } 87 }
88 88
89 - (NSView*)ancestorWithViewID:(ViewID)viewID {
90 NSView* ancestor = self;
91 while (ancestor && [ancestor viewID] != viewID)
92 ancestor = [ancestor superview];
93 return ancestor;
94 }
95
89 @end 96 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/view_id_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698