| OLD | NEW |
| 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/extensions/browser_action_button.h" | 5 #import "chrome/browser/cocoa/extensions/browser_action_button.h" |
| 6 | 6 |
| 7 #include "app/gfx/canvas_paint.h" | |
| 8 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
| 9 #include "chrome/browser/cocoa/extensions/extension_action_context_menu.h" | 8 #include "chrome/browser/cocoa/extensions/extension_action_context_menu.h" |
| 10 #include "chrome/browser/extensions/image_loading_tracker.h" | 9 #include "chrome/browser/extensions/image_loading_tracker.h" |
| 11 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| 12 #include "chrome/common/notification_observer.h" | 11 #include "chrome/common/notification_observer.h" |
| 13 #include "chrome/common/notification_registrar.h" | 12 #include "chrome/common/notification_registrar.h" |
| 14 #include "chrome/common/notification_source.h" | 13 #include "chrome/common/notification_source.h" |
| 15 #include "chrome/common/notification_type.h" | 14 #include "chrome/common/notification_type.h" |
| 15 #include "gfx/canvas_paint.h" |
| 16 #include "gfx/rect.h" | 16 #include "gfx/rect.h" |
| 17 #include "gfx/size.h" | 17 #include "gfx/size.h" |
| 18 #include "skia/ext/skia_utils_mac.h" | 18 #include "skia/ext/skia_utils_mac.h" |
| 19 | 19 |
| 20 extern const NSString* kBrowserActionButtonUpdatedNotification = | 20 extern const NSString* kBrowserActionButtonUpdatedNotification = |
| 21 @"BrowserActionButtonUpdatedNotification"; | 21 @"BrowserActionButtonUpdatedNotification"; |
| 22 | 22 |
| 23 static const CGFloat kBrowserActionBadgeOriginYOffset = 5; | 23 static const CGFloat kBrowserActionBadgeOriginYOffset = 5; |
| 24 | 24 |
| 25 // Since the container is the maximum height of the toolbar, we have to move the | 25 // Since the container is the maximum height of the toolbar, we have to move the |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 [super drawInteriorWithFrame:cellFrame inView:controlView]; | 248 [super drawInteriorWithFrame:cellFrame inView:controlView]; |
| 249 cellFrame.origin.y += kBrowserActionBadgeOriginYOffset; | 249 cellFrame.origin.y += kBrowserActionBadgeOriginYOffset; |
| 250 [self drawBadgeWithinFrame:cellFrame]; | 250 [self drawBadgeWithinFrame:cellFrame]; |
| 251 [NSGraphicsContext restoreGraphicsState]; | 251 [NSGraphicsContext restoreGraphicsState]; |
| 252 } | 252 } |
| 253 | 253 |
| 254 @synthesize tabId = tabId_; | 254 @synthesize tabId = tabId_; |
| 255 @synthesize extensionAction = extensionAction_; | 255 @synthesize extensionAction = extensionAction_; |
| 256 | 256 |
| 257 @end | 257 @end |
| OLD | NEW |