| 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 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ |
| 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ | 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ |
| 7 | 7 |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #import "chrome/browser/cocoa/location_bar/image_decoration.h" | 9 #import "chrome/browser/cocoa/location_bar/image_decoration.h" |
| 10 #include "chrome/common/content_settings_types.h" | 10 #include "chrome/common/content_settings_types.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 // Updates the image and visibility state based on the supplied TabContents. | 27 // Updates the image and visibility state based on the supplied TabContents. |
| 28 void UpdateFromTabContents(const TabContents* tab_contents); | 28 void UpdateFromTabContents(const TabContents* tab_contents); |
| 29 | 29 |
| 30 // Overridden from |LocationBarDecoration| | 30 // Overridden from |LocationBarDecoration| |
| 31 virtual bool AcceptsMousePress() { return true; } | 31 virtual bool AcceptsMousePress() { return true; } |
| 32 virtual bool OnMousePressed(NSRect frame); | 32 virtual bool OnMousePressed(NSRect frame); |
| 33 virtual NSString* GetToolTip(); | 33 virtual NSString* GetToolTip(); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // Helper to get where the bubble point should land. Similar to |
| 37 // |PageActionDecoration| or |StarDecoration| (|LocationBarViewMac| |
| 38 // calls those). |
| 39 NSPoint GetBubblePointInFrame(NSRect frame); |
| 40 |
| 36 void SetToolTip(NSString* tooltip); | 41 void SetToolTip(NSString* tooltip); |
| 37 | 42 |
| 38 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; | 43 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; |
| 39 | 44 |
| 40 LocationBarViewMac* owner_; // weak | 45 LocationBarViewMac* owner_; // weak |
| 41 Profile* profile_; // weak | 46 Profile* profile_; // weak |
| 42 | 47 |
| 43 scoped_nsobject<NSString> tooltip_; | 48 scoped_nsobject<NSString> tooltip_; |
| 44 | 49 |
| 45 DISALLOW_COPY_AND_ASSIGN(ContentSettingDecoration); | 50 DISALLOW_COPY_AND_ASSIGN(ContentSettingDecoration); |
| 46 }; | 51 }; |
| 47 | 52 |
| 48 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ | 53 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ |
| OLD | NEW |