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 "browser_actions_controller.h" | 5 #import "browser_actions_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
28 #include "content/public/browser/notification_observer.h" | 28 #include "content/public/browser/notification_observer.h" |
29 #include "content/public/browser/notification_registrar.h" | 29 #include "content/public/browser/notification_registrar.h" |
30 #include "content/public/browser/notification_details.h" | 30 #include "content/public/browser/notification_details.h" |
31 #include "content/public/browser/notification_source.h" | 31 #include "content/public/browser/notification_source.h" |
32 #include "grit/theme_resources.h" | 32 #include "grit/theme_resources.h" |
33 #include "grit/theme_resources_standard.h" | 33 #include "grit/theme_resources_standard.h" |
34 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 34 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
35 #include "ui/gfx/mac/nsimage_cache.h" | 35 #include "ui/gfx/mac/nsimage_cache.h" |
36 | 36 |
| 37 using extensions::Extension; |
| 38 using extensions::ExtensionList; |
| 39 |
37 NSString* const kBrowserActionVisibilityChangedNotification = | 40 NSString* const kBrowserActionVisibilityChangedNotification = |
38 @"BrowserActionVisibilityChangedNotification"; | 41 @"BrowserActionVisibilityChangedNotification"; |
39 | 42 |
40 namespace { | 43 namespace { |
41 const CGFloat kAnimationDuration = 0.2; | 44 const CGFloat kAnimationDuration = 0.2; |
42 | 45 |
43 const CGFloat kChevronWidth = 14.0; | 46 const CGFloat kChevronWidth = 14.0; |
44 | 47 |
45 // Since the container is the maximum height of the toolbar, we have | 48 // Since the container is the maximum height of the toolbar, we have |
46 // to move the buttons up by this amount in order to have them look | 49 // to move the buttons up by this amount in order to have them look |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 if (profile_->IsOffTheRecord()) | 860 if (profile_->IsOffTheRecord()) |
858 index = toolbarModel_->IncognitoIndexToOriginal(index); | 861 index = toolbarModel_->IncognitoIndexToOriginal(index); |
859 if (index < toolbarModel_->size()) { | 862 if (index < toolbarModel_->size()) { |
860 const Extension* extension = toolbarModel_->GetExtensionByIndex(index); | 863 const Extension* extension = toolbarModel_->GetExtensionByIndex(index); |
861 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; | 864 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; |
862 } | 865 } |
863 return nil; | 866 return nil; |
864 } | 867 } |
865 | 868 |
866 @end | 869 @end |
OLD | NEW |