| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ | 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #import "chrome/browser/ui/cocoa/location_bar/image_decoration.h" | 9 #import "chrome/browser/ui/cocoa/location_bar/image_decoration.h" |
| 10 #include "chrome/common/content_settings_types.h" | 10 #include "chrome/common/content_settings_types.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 // Helper to get where the bubble point should land. Similar to | 47 // Helper to get where the bubble point should land. Similar to |
| 48 // |PageActionDecoration| or |StarDecoration| (|LocationBarViewMac| | 48 // |PageActionDecoration| or |StarDecoration| (|LocationBarViewMac| |
| 49 // calls those). | 49 // calls those). |
| 50 NSPoint GetBubblePointInFrame(NSRect frame); | 50 NSPoint GetBubblePointInFrame(NSRect frame); |
| 51 | 51 |
| 52 void SetToolTip(NSString* tooltip); | 52 void SetToolTip(NSString* tooltip); |
| 53 | 53 |
| 54 // Returns an attributed string with the animated text. | 54 // Returns an attributed string with the animated text. |
| 55 scoped_nsobject<NSAttributedString> CreateAnimatedText(); | 55 base::scoped_nsobject<NSAttributedString> CreateAnimatedText(); |
| 56 | 56 |
| 57 // Measure the width of the animated text. | 57 // Measure the width of the animated text. |
| 58 CGFloat MeasureTextWidth(); | 58 CGFloat MeasureTextWidth(); |
| 59 | 59 |
| 60 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; | 60 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; |
| 61 | 61 |
| 62 LocationBarViewMac* owner_; // weak | 62 LocationBarViewMac* owner_; // weak |
| 63 Profile* profile_; // weak | 63 Profile* profile_; // weak |
| 64 | 64 |
| 65 scoped_nsobject<NSString> tooltip_; | 65 base::scoped_nsobject<NSString> tooltip_; |
| 66 | 66 |
| 67 // Used when the decoration has animated text. | 67 // Used when the decoration has animated text. |
| 68 scoped_nsobject<ContentSettingAnimationState> animation_; | 68 base::scoped_nsobject<ContentSettingAnimationState> animation_; |
| 69 CGFloat text_width_; | 69 CGFloat text_width_; |
| 70 scoped_nsobject<NSAttributedString> animated_text_; | 70 base::scoped_nsobject<NSAttributedString> animated_text_; |
| 71 scoped_nsobject<NSGradient> gradient_; | 71 base::scoped_nsobject<NSGradient> gradient_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(ContentSettingDecoration); | 73 DISALLOW_COPY_AND_ASSIGN(ContentSettingDecoration); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ | 76 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ |
| OLD | NEW |