| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tabs/tab_view.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/mac/sdk_forward_declarations.h" | 9 #include "base/mac/sdk_forward_declarations.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // Cancel any delayed requests that may still be pending (drags or hover). | 212 // Cancel any delayed requests that may still be pending (drags or hover). |
| 213 [NSObject cancelPreviousPerformRequestsWithTarget:self]; | 213 [NSObject cancelPreviousPerformRequestsWithTarget:self]; |
| 214 if (&NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification) { | 214 if (&NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification) { |
| 215 NSNotificationCenter* center = | 215 NSNotificationCenter* center = |
| 216 [[NSWorkspace sharedWorkspace] notificationCenter]; | 216 [[NSWorkspace sharedWorkspace] notificationCenter]; |
| 217 [center removeObserver:self]; | 217 [center removeObserver:self]; |
| 218 } | 218 } |
| 219 [super dealloc]; | 219 [super dealloc]; |
| 220 } | 220 } |
| 221 | 221 |
| 222 // Called by AppKit to check if dragging this view should move the window. |
| 223 // NSButton overrides this method in the same way so dragging window buttons |
| 224 // has no effect. |
| 225 - (NSRect)_opaqueRectForWindowMoveWhenInTitlebar { |
| 226 return [self bounds]; |
| 227 } |
| 228 |
| 222 // Called to obtain the context menu for when the user hits the right mouse | 229 // Called to obtain the context menu for when the user hits the right mouse |
| 223 // button (or control-clicks). (Note that -rightMouseDown: is *not* called for | 230 // button (or control-clicks). (Note that -rightMouseDown: is *not* called for |
| 224 // control-click.) | 231 // control-click.) |
| 225 - (NSMenu*)menu { | 232 - (NSMenu*)menu { |
| 226 if ([self isClosing]) | 233 if ([self isClosing]) |
| 227 return nil; | 234 return nil; |
| 228 | 235 |
| 229 return [controller_ menu]; | 236 return [controller_ menu]; |
| 230 } | 237 } |
| 231 | 238 |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 | 1009 |
| 1003 // For "Increase Contrast" mode, use flat black instead of semitransparent black | 1010 // For "Increase Contrast" mode, use flat black instead of semitransparent black |
| 1004 // for the tab edge stroke. | 1011 // for the tab edge stroke. |
| 1005 + (void)setTabEdgeStrokeColor { | 1012 + (void)setTabEdgeStrokeColor { |
| 1006 static NSColor* heavyStrokeColor = | 1013 static NSColor* heavyStrokeColor = |
| 1007 [skia::SkColorToSRGBNSColor(SK_ColorBLACK) retain]; | 1014 [skia::SkColorToSRGBNSColor(SK_ColorBLACK) retain]; |
| 1008 [heavyStrokeColor set]; | 1015 [heavyStrokeColor set]; |
| 1009 } | 1016 } |
| 1010 | 1017 |
| 1011 @end | 1018 @end |
| OLD | NEW |