| 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/tabpose_window.h" | 5 #import "chrome/browser/ui/cocoa/tabpose_window.h" |
| 6 | 6 |
| 7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "content/public/browser/web_contents.h" | 34 #include "content/public/browser/web_contents.h" |
| 35 #include "grit/theme_resources.h" | 35 #include "grit/theme_resources.h" |
| 36 #include "grit/ui_resources.h" | 36 #include "grit/ui_resources.h" |
| 37 #include "skia/ext/skia_utils_mac.h" | 37 #include "skia/ext/skia_utils_mac.h" |
| 38 #include "third_party/skia/include/utils/mac/SkCGUtils.h" | 38 #include "third_party/skia/include/utils/mac/SkCGUtils.h" |
| 39 #include "ui/base/resource/resource_bundle.h" | 39 #include "ui/base/resource/resource_bundle.h" |
| 40 #include "ui/gfx/image/image.h" | 40 #include "ui/gfx/image/image.h" |
| 41 #include "ui/gfx/scoped_cg_context_save_gstate_mac.h" | 41 #include "ui/gfx/scoped_cg_context_save_gstate_mac.h" |
| 42 | 42 |
| 43 using content::BrowserThread; | 43 using content::BrowserThread; |
| 44 using content::RenderWidgetHost; |
| 44 | 45 |
| 45 // Height of the bottom gradient, in pixels. | 46 // Height of the bottom gradient, in pixels. |
| 46 const CGFloat kBottomGradientHeight = 50; | 47 const CGFloat kBottomGradientHeight = 50; |
| 47 | 48 |
| 48 // The shade of gray at the top of the window. There's a gradient from | 49 // The shade of gray at the top of the window. There's a gradient from |
| 49 // this to |kCentralGray| at the top of the window. | 50 // this to |kCentralGray| at the top of the window. |
| 50 const CGFloat kTopGray = 0.77; | 51 const CGFloat kTopGray = 0.77; |
| 51 | 52 |
| 52 // The shade of gray at the center of the window. Most of the window background | 53 // The shade of gray at the center of the window. Most of the window background |
| 53 // has this color. | 54 // has this color. |
| (...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1665 tile.set_tab_contents(contents); | 1666 tile.set_tab_contents(contents); |
| 1666 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; | 1667 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; |
| 1667 [thumbLayer setTabContents:contents]; | 1668 [thumbLayer setTabContents:contents]; |
| 1668 } | 1669 } |
| 1669 | 1670 |
| 1670 - (void)tabStripModelDeleted { | 1671 - (void)tabStripModelDeleted { |
| 1671 [self close]; | 1672 [self close]; |
| 1672 } | 1673 } |
| 1673 | 1674 |
| 1674 @end | 1675 @end |
| OLD | NEW |