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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/overlay_drop_shadow_view.mm

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/tab_contents/preview_drop_shadow_view.h" 5 #import "chrome/browser/ui/cocoa/tab_contents/overlay_drop_shadow_view.h"
6 6
7 #include "grit/theme_resources.h" 7 #include "grit/theme_resources.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 9
10 @implementation PreviewDropShadowView 10 @implementation OverlayDropShadowView
11 11
12 + (CGFloat)preferredHeight { 12 + (CGFloat)preferredHeight {
13 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 13 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
14 NSImage* shadowImage = 14 NSImage* shadowImage =
15 rb.GetNativeImageNamed(IDR_PREVIEW_DROP_SHADOW).ToNSImage(); 15 rb.GetNativeImageNamed(IDR_OVERLAY_DROP_SHADOW).ToNSImage();
16 return [shadowImage size].height; 16 return [shadowImage size].height;
17 } 17 }
18 18
19 - (void)drawRect:(NSRect)rect { 19 - (void)drawRect:(NSRect)rect {
20 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 20 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
21 NSRect bounds = [self bounds]; 21 NSRect bounds = [self bounds];
22 22
23 // Draw the shadow. 23 // Draw the shadow.
24 NSImage* shadowImage = 24 NSImage* shadowImage =
25 rb.GetNativeImageNamed(IDR_PREVIEW_DROP_SHADOW).ToNSImage(); 25 rb.GetNativeImageNamed(IDR_OVERLAY_DROP_SHADOW).ToNSImage();
26 [shadowImage drawInRect:bounds 26 [shadowImage drawInRect:bounds
27 fromRect:NSZeroRect 27 fromRect:NSZeroRect
28 operation:NSCompositeSourceOver 28 operation:NSCompositeSourceOver
29 fraction:1.0]; 29 fraction:1.0];
30 } 30 }
31 31
32 @end 32 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698