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

Unified Diff: chrome/browser/ui/cocoa/infobar_gradient_view.mm

Issue 6377001: [Mac] Organize all infobar files into chrome/browser/ui/cocoa/infobars/.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/infobar_gradient_view.mm
===================================================================
--- chrome/browser/ui/cocoa/infobar_gradient_view.mm (revision 71658)
+++ chrome/browser/ui/cocoa/infobar_gradient_view.mm (working copy)
@@ -1,70 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/cocoa/infobar_gradient_view.h"
-
-#include "base/scoped_nsobject.h"
-#import "chrome/browser/themes/browser_theme_provider.h"
-#import "chrome/browser/ui/cocoa/themed_window.h"
-
-namespace {
-
-const double kBackgroundColorTop[3] =
- {255.0 / 255.0, 242.0 / 255.0, 183.0 / 255.0};
-const double kBackgroundColorBottom[3] =
- {250.0 / 255.0, 230.0 / 255.0, 145.0 / 255.0};
-}
-
-@implementation InfoBarGradientView
-
-- (id)initWithFrame:(NSRect)frameRect {
- if ((self = [super initWithFrame:frameRect])) {
- NSColor* startingColor =
- [NSColor colorWithCalibratedRed:kBackgroundColorTop[0]
- green:kBackgroundColorTop[1]
- blue:kBackgroundColorTop[2]
- alpha:1.0];
- NSColor* endingColor =
- [NSColor colorWithCalibratedRed:kBackgroundColorBottom[0]
- green:kBackgroundColorBottom[1]
- blue:kBackgroundColorBottom[2]
- alpha:1.0];
- scoped_nsobject<NSGradient> gradient(
- [[NSGradient alloc] initWithStartingColor:startingColor
- endingColor:endingColor]);
- [self setGradient:gradient];
- }
- return self;
-}
-
-- (NSColor*)strokeColor {
- ThemeProvider* themeProvider = [[self window] themeProvider];
- if (!themeProvider)
- return [NSColor blackColor];
-
- BOOL active = [[self window] isMainWindow];
- return themeProvider->GetNSColor(
- active ? BrowserThemeProvider::COLOR_TOOLBAR_STROKE :
- BrowserThemeProvider::COLOR_TOOLBAR_STROKE_INACTIVE,
- true);
-}
-
-- (BOOL)mouseDownCanMoveWindow {
- return NO;
-}
-
-// This view is intentionally not opaque because it overlaps with the findbar.
-
-- (BOOL)accessibilityIsIgnored {
- return NO;
-}
-
-- (id)accessibilityAttributeValue:(NSString*)attribute {
- if ([attribute isEqual:NSAccessibilityRoleAttribute])
- return NSAccessibilityGroupRole;
-
- return [super accessibilityAttributeValue:attribute];
-}
-
-@end
« no previous file with comments | « chrome/browser/ui/cocoa/infobar_gradient_view.h ('k') | chrome/browser/ui/cocoa/infobar_gradient_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698