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/extensions/browser_action_button.h" | 5 #import "chrome/browser/ui/cocoa/extensions/browser_action_button.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
12 #include "chrome/browser/extensions/extension_action.h" | 12 #include "chrome/browser/extensions/extension_action.h" |
13 #include "chrome/browser/extensions/extension_action_icon_factory.h" | 13 #include "chrome/browser/extensions/extension_action_icon_factory.h" |
14 #include "chrome/browser/extensions/extension_action_manager.h" | 14 #include "chrome/browser/extensions/extension_action_manager.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" | 16 #include "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" |
17 #include "chrome/common/chrome_notification_types.h" | 17 #include "chrome/common/chrome_notification_types.h" |
18 #include "chrome/common/extensions/extension.h" | 18 #include "chrome/common/extensions/extension.h" |
19 #include "chrome/common/extensions/extension_resource.h" | |
20 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
21 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
22 #include "content/public/browser/notification_source.h" | 21 #include "content/public/browser/notification_source.h" |
23 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
24 #include "skia/ext/skia_utils_mac.h" | 23 #include "skia/ext/skia_utils_mac.h" |
25 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 24 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
26 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
27 #include "ui/gfx/canvas_skia_paint.h" | 26 #include "ui/gfx/canvas_skia_paint.h" |
28 #include "ui/gfx/image/image.h" | 27 #include "ui/gfx/image/image.h" |
29 #include "ui/gfx/rect.h" | 28 #include "ui/gfx/rect.h" |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 operation:NSCompositeSourceOver | 337 operation:NSCompositeSourceOver |
339 fraction:enabled ? 1.0 : 0.4 | 338 fraction:enabled ? 1.0 : 0.4 |
340 respectFlipped:YES | 339 respectFlipped:YES |
341 hints:nil]; | 340 hints:nil]; |
342 | 341 |
343 cellFrame.origin.y += kBrowserActionBadgeOriginYOffset; | 342 cellFrame.origin.y += kBrowserActionBadgeOriginYOffset; |
344 [self drawBadgeWithinFrame:cellFrame]; | 343 [self drawBadgeWithinFrame:cellFrame]; |
345 } | 344 } |
346 | 345 |
347 @end | 346 @end |
OLD | NEW |