| 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_PAGE_ACTION_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
| 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ | 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import "chrome/browser/cocoa/location_bar/image_decoration.h" | 9 #import "chrome/browser/cocoa/location_bar/image_decoration.h" |
| 10 | 10 |
| 11 #include "chrome/browser/extensions/image_loading_tracker.h" | 11 #include "chrome/browser/extensions/image_loading_tracker.h" |
| 12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
| 13 | 13 |
| 14 class ExtensionAction; | 14 class ExtensionAction; |
| 15 @class ExtensionActionContextMenu; |
| 15 class LocationBarViewMac; | 16 class LocationBarViewMac; |
| 16 class Profile; | 17 class Profile; |
| 17 class TabContents; | 18 class TabContents; |
| 18 | 19 |
| 19 // PageActionDecoration is used to display the icon for a given Page | 20 // PageActionDecoration is used to display the icon for a given Page |
| 20 // Action and notify the extension when the icon is clicked. | 21 // Action and notify the extension when the icon is clicked. |
| 21 | 22 |
| 22 class PageActionDecoration : public ImageDecoration, | 23 class PageActionDecoration : public ImageDecoration, |
| 23 public ImageLoadingTracker::Observer, | 24 public ImageLoadingTracker::Observer, |
| 24 public NotificationObserver { | 25 public NotificationObserver { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 95 |
| 95 // The tab id we are currently showing the icon for. | 96 // The tab id we are currently showing the icon for. |
| 96 int current_tab_id_; | 97 int current_tab_id_; |
| 97 | 98 |
| 98 // The URL we are currently showing the icon for. | 99 // The URL we are currently showing the icon for. |
| 99 GURL current_url_; | 100 GURL current_url_; |
| 100 | 101 |
| 101 // The string to show for a tooltip. | 102 // The string to show for a tooltip. |
| 102 scoped_nsobject<NSString> tooltip_; | 103 scoped_nsobject<NSString> tooltip_; |
| 103 | 104 |
| 105 // The context menu for the Page Action. |
| 106 scoped_nsobject<ExtensionActionContextMenu> menu_; |
| 107 |
| 104 // This is used for post-install visual feedback. The page_action | 108 // This is used for post-install visual feedback. The page_action |
| 105 // icon is briefly shown even if it hasn't been enabled by its | 109 // icon is briefly shown even if it hasn't been enabled by its |
| 106 // extension. | 110 // extension. |
| 107 bool preview_enabled_; | 111 bool preview_enabled_; |
| 108 | 112 |
| 109 // Used to register for notifications received by | 113 // Used to register for notifications received by |
| 110 // NotificationObserver. | 114 // NotificationObserver. |
| 111 NotificationRegistrar registrar_; | 115 NotificationRegistrar registrar_; |
| 112 | 116 |
| 113 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); | 117 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); |
| 114 }; | 118 }; |
| 115 | 119 |
| 116 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ | 120 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
| OLD | NEW |