| 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" |
| 11 #include "chrome/browser/themes/theme_service.h" | 11 #include "chrome/browser/themes/theme_service.h" |
| 12 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 12 #import "chrome/browser/ui/cocoa/nsview_additions.h" |
| 13 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" | 13 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" |
| 14 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" | 14 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" |
| 15 #import "chrome/browser/ui/cocoa/themed_window.h" | 15 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 16 #import "chrome/browser/ui/cocoa/view_id_util.h" | 16 #import "chrome/browser/ui/cocoa/view_id_util.h" |
| 17 #include "grit/generated_resources.h" | 17 #include "chrome/grit/generated_resources.h" |
| 18 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.h" |
| 19 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMFadeTruncatingTextFiel
dCell.h" | 19 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMFadeTruncatingTextFiel
dCell.h" |
| 20 #import "ui/base/cocoa/nsgraphics_context_additions.h" | 20 #import "ui/base/cocoa/nsgraphics_context_additions.h" |
| 21 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
| 22 #include "ui/base/resource/resource_bundle.h" | 22 #include "ui/base/resource/resource_bundle.h" |
| 23 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 23 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
| 24 | 24 |
| 25 | 25 |
| 26 const int kMaskHeight = 29; // Height of the mask bitmap. | 26 const int kMaskHeight = 29; // Height of the mask bitmap. |
| 27 const int kFillHeight = 25; // Height of the "mask on" part of the mask bitmap. | 27 const int kFillHeight = 25; // Height of the "mask on" part of the mask bitmap. |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 CGFloat middleWidth = tabWidth - leftWidth - rightWidth; | 784 CGFloat middleWidth = tabWidth - leftWidth - rightWidth; |
| 785 NSRect middleRect = NSMakeRect(leftWidth, 0, middleWidth, kFillHeight); | 785 NSRect middleRect = NSMakeRect(leftWidth, 0, middleWidth, kFillHeight); |
| 786 [[NSColor whiteColor] setFill]; | 786 [[NSColor whiteColor] setFill]; |
| 787 NSRectFill(middleRect); | 787 NSRectFill(middleRect); |
| 788 | 788 |
| 789 maskCache_.reset(CGBitmapContextCreateImage(maskContext)); | 789 maskCache_.reset(CGBitmapContextCreateImage(maskContext)); |
| 790 return maskCache_; | 790 return maskCache_; |
| 791 } | 791 } |
| 792 | 792 |
| 793 @end // @implementation TabView(Private) | 793 @end // @implementation TabView(Private) |
| OLD | NEW |