Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / base / cocoa / view_description.mm
blob1734f8817be9b774b9090835a6fa166017bcb9be
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #import "ui/base/cocoa/view_description.h"
7 #if !NDEBUG
9 @implementation NSView (CrDebugging)
11 - (NSString*)cr_recursiveDescriptionWithPrefix:(NSString*)prefix {
12   NSString* description =
13       [NSString stringWithFormat:@"%@ <%@ %p, frame=%@, hidden=%d>\n",
14           prefix, [self class], self, NSStringFromRect([self frame]),
15           [self isHidden]];
16   prefix = [prefix stringByAppendingString:@"--"];
18   for (NSView* subview in [self subviews]) {
19     description = [description stringByAppendingString:
20         [subview cr_recursiveDescriptionWithPrefix:prefix]];
21   }
22   return description;
25 - (NSString*)cr_recursiveDescription {
26   return [self cr_recursiveDescriptionWithPrefix:@""];
29 @end
31 #endif  // !NDEBUG