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

Side by Side Diff: chrome/browser/cocoa/side_tab_strip_view.mm

Issue 2973004: [Mac]Implement ViewID support. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Turns out that, it's not a good solution. Created 10 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/side_tab_strip_view.h" 5 #import "chrome/browser/cocoa/side_tab_strip_view.h"
6 6
7 #include "base/scoped_nsobject.h" 7 #include "base/scoped_nsobject.h"
8 #import "chrome/browser/cocoa/view_id_util.h"
8 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h" 9 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
9 10
10 @implementation SideTabStripView 11 @implementation SideTabStripView
11 12
12 - (void)drawBorder:(NSRect)bounds { 13 - (void)drawBorder:(NSRect)bounds {
13 // Draw a border on the right side. 14 // Draw a border on the right side.
14 NSRect borderRect, contentRect; 15 NSRect borderRect, contentRect;
15 NSDivideRect(bounds, &borderRect, &contentRect, 1, NSMaxXEdge); 16 NSDivideRect(bounds, &borderRect, &contentRect, 1, NSMaxXEdge);
16 [[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set]; 17 [[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set];
17 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver); 18 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver);
(...skipping 15 matching lines...) Expand all
33 scoped_nsobject<NSGradient> gradient( 34 scoped_nsobject<NSGradient> gradient(
34 [[NSGradient alloc] initWithStartingColor:aColor endingColor:bColor]); 35 [[NSGradient alloc] initWithStartingColor:aColor endingColor:bColor]);
35 36
36 NSRect gradientRect = [self bounds]; 37 NSRect gradientRect = [self bounds];
37 [gradient drawInRect:gradientRect angle:270.0]; 38 [gradient drawInRect:gradientRect angle:270.0];
38 39
39 // Draw borders and any drop feedback. 40 // Draw borders and any drop feedback.
40 [super drawRect:rect]; 41 [super drawRect:rect];
41 } 42 }
42 43
44 // Tag is used solely for ViewID. Override to prevent changing of it.
45 - (NSInteger)tag {
46 return view_id_util::ViewIDToTag(VIEW_ID_TAB_STRIP);
47 }
48
43 @end 49 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/reload_button_unittest.mm ('k') | chrome/browser/cocoa/tab_contents_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698