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 "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 "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/browser/tab_contents/tab_contents.h" | 23 #include "chrome/browser/tab_contents/tab_contents.h" |
24 #include "chrome/common/extensions/extension_action.h" | 24 #include "chrome/common/extensions/extension_action.h" |
25 #include "chrome/common/notification_observer.h" | 25 #include "chrome/common/notification_observer.h" |
26 #include "chrome/common/notification_registrar.h" | 26 #include "chrome/common/notification_registrar.h" |
27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
28 #include "grit/theme_resources.h" | 28 #include "grit/theme_resources.h" |
29 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 29 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
30 | 30 |
31 const CGFloat kBrowserActionButtonPadding = 3; | 31 const CGFloat kBrowserActionButtonPadding = 3; |
32 | 32 |
33 extern const NSString* kBrowserActionVisibilityChangedNotification = | 33 NSString* const kBrowserActionVisibilityChangedNotification = |
34 @"BrowserActionVisibilityChangedNotification"; | 34 @"BrowserActionVisibilityChangedNotification"; |
35 | 35 |
36 namespace { | 36 namespace { |
37 const CGFloat kAnimationDuration = 0.2; | 37 const CGFloat kAnimationDuration = 0.2; |
38 // When determining the opacity during a drag, we artificially reduce the | 38 // When determining the opacity during a drag, we artificially reduce the |
39 // distance to the edge in order to make the fade more apparent. | 39 // distance to the edge in order to make the fade more apparent. |
40 const CGFloat kButtonOpacityLeadPadding = 5.0; | 40 const CGFloat kButtonOpacityLeadPadding = 5.0; |
41 const CGFloat kChevronHeight = 28.0; | 41 const CGFloat kChevronHeight = 28.0; |
42 const CGFloat kChevronLowerPadding = 5.0; | 42 const CGFloat kChevronLowerPadding = 5.0; |
43 const CGFloat kChevronRightPadding = 5.0; | 43 const CGFloat kChevronRightPadding = 5.0; |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 if (profile_->IsOffTheRecord()) | 829 if (profile_->IsOffTheRecord()) |
830 index = toolbarModel_->IncognitoIndexToOriginal(index); | 830 index = toolbarModel_->IncognitoIndexToOriginal(index); |
831 if (index < toolbarModel_->size()) { | 831 if (index < toolbarModel_->size()) { |
832 Extension* extension = toolbarModel_->GetExtensionByIndex(index); | 832 Extension* extension = toolbarModel_->GetExtensionByIndex(index); |
833 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; | 833 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; |
834 } | 834 } |
835 return nil; | 835 return nil; |
836 } | 836 } |
837 | 837 |
838 @end | 838 @end |
OLD | NEW |