Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / tabs / tab_view.mm
index 1cf99d4..fd8fbdf 100644 (file)
@@ -9,6 +9,7 @@
 #include "base/mac/sdk_forward_declarations.h"
 #include "base/strings/sys_string_conversions.h"
 #include "chrome/browser/themes/theme_service.h"
+#import "chrome/browser/ui/cocoa/tabs/media_indicator_button.h"
 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
 #import "chrome/browser/ui/cocoa/themed_window.h"
@@ -155,12 +156,13 @@ const CGFloat kRapidCloseDist = 2.5;
 }
 
 // Determines which view a click in our frame actually hit. It's either this
-// view or our child close button.
+// view or one of the child buttons.
 - (NSView*)hitTest:(NSPoint)aPoint {
-  NSPoint viewPoint = [self convertPoint:aPoint fromView:[self superview]];
-  if (![closeButton_ isHidden])
-    if (NSPointInRect(viewPoint, [closeButton_ frame])) return closeButton_;
+  NSView* const defaultHitTestResult = [super hitTest:aPoint];
+  if ([defaultHitTestResult isKindOfClass:[NSButton class]])
+    return defaultHitTestResult;
 
+  NSPoint viewPoint = [self convertPoint:aPoint fromView:[self superview]];
   NSRect pointRect = NSMakeRect(viewPoint.x, viewPoint.y, 1, 1);
 
   ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();