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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 2404783002: [Mac] Avoid "adding unknown subview" warning. (Closed)
Patch Set: Merged with head Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index 626d742e101675067ae37c08e24de353f009093a..42cdd3c2e2627e3e4a2121b4cb545b48fcfa705e 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -229,6 +229,13 @@ CGFloat FlipXInView(NSView* view, CGFloat width, CGFloat x) {
return NO;
}
+// Called by AppKit to check if dragging this view should move the window.
+// NSButton overrides this method in the same way so dragging window buttons
+// has no effect.
+- (NSRect)_opaqueRectForWindowMoveWhenInTitlebar {
tapted 2016/10/10 23:38:06 nit: we typically forward-declare these - I guess
Eugene But (OOO till 7-30) 2016/10/11 00:33:10 Done.
+ return [self bounds];
tapted 2016/10/10 23:38:06 Maybe comment here what the base class returns? (I
Eugene But (OOO till 7-30) 2016/10/11 00:33:10 Done in predeclaration.
+}
+
- (id)initWithFrame:(NSRect)frameRect
controller:(TabStripController*)controller {
if ((self = [super initWithFrame:frameRect])) {

Powered by Google App Engine
This is Rietveld 408576698