| 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 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 ContentSettingDecoration(ContentSettingsType settings_type, | 22 ContentSettingDecoration(ContentSettingsType settings_type, |
| 23 LocationBarViewMac* owner, | 23 LocationBarViewMac* owner, |
| 24 Profile* profile); | 24 Profile* profile); |
| 25 virtual ~ContentSettingDecoration(); | 25 virtual ~ContentSettingDecoration(); |
| 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 OnMousePressed(NSRect frame); | 32 virtual bool OnMousePressed(NSRect frame); |
| 32 virtual NSString* GetToolTip(); | 33 virtual NSString* GetToolTip(); |
| 33 | 34 |
| 34 private: | 35 private: |
| 35 void SetToolTip(NSString* tooltip); | 36 void SetToolTip(NSString* tooltip); |
| 36 | 37 |
| 37 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; | 38 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; |
| 38 | 39 |
| 39 LocationBarViewMac* owner_; // weak | 40 LocationBarViewMac* owner_; // weak |
| 40 Profile* profile_; // weak | 41 Profile* profile_; // weak |
| 41 | 42 |
| 42 scoped_nsobject<NSString> tooltip_; | 43 scoped_nsobject<NSString> tooltip_; |
| 43 | 44 |
| 44 DISALLOW_COPY_AND_ASSIGN(ContentSettingDecoration); | 45 DISALLOW_COPY_AND_ASSIGN(ContentSettingDecoration); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ | 48 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ |
| OLD | NEW |