OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PAGE_ACTION_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ | 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
11 #import "chrome/browser/ui/cocoa/location_bar/image_decoration.h" | 12 #import "chrome/browser/ui/cocoa/location_bar/image_decoration.h" |
12 #include "chrome/browser/ui/toolbar/toolbar_action_view_delegate.h" | 13 #include "chrome/browser/ui/toolbar/toolbar_action_view_delegate.h" |
13 | 14 |
14 class Browser; | 15 class Browser; |
15 class ExtensionAction; | 16 class ExtensionAction; |
16 class ExtensionActionViewController; | 17 class ExtensionActionViewController; |
17 class LocationBarViewMac; | 18 class LocationBarViewMac; |
18 @class MenuController; | 19 @class MenuController; |
19 | 20 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 70 |
70 // Overridden from ToolbarActionViewDelegate: | 71 // Overridden from ToolbarActionViewDelegate: |
71 content::WebContents* GetCurrentWebContents() const override; | 72 content::WebContents* GetCurrentWebContents() const override; |
72 bool IsMenuRunning() const override; | 73 bool IsMenuRunning() const override; |
73 void UpdateState() override; | 74 void UpdateState() override; |
74 | 75 |
75 // The location bar view that owns us. | 76 // The location bar view that owns us. |
76 LocationBarViewMac* owner_; | 77 LocationBarViewMac* owner_; |
77 | 78 |
78 // The view controller for this page action. | 79 // The view controller for this page action. |
79 scoped_ptr<ExtensionActionViewController> viewController_; | 80 std::unique_ptr<ExtensionActionViewController> viewController_; |
80 | 81 |
81 // The string to show for a tooltip. | 82 // The string to show for a tooltip. |
82 base::scoped_nsobject<NSString> tooltip_; | 83 base::scoped_nsobject<NSString> tooltip_; |
83 | 84 |
84 // The context menu controller for the Page Action. | 85 // The context menu controller for the Page Action. |
85 base::scoped_nsobject<MenuController> contextMenuController_; | 86 base::scoped_nsobject<MenuController> contextMenuController_; |
86 | 87 |
87 // This is used for post-install visual feedback. The page_action | 88 // This is used for post-install visual feedback. The page_action |
88 // icon is briefly shown even if it hasn't been enabled by its | 89 // icon is briefly shown even if it hasn't been enabled by its |
89 // extension. | 90 // extension. |
90 bool preview_enabled_; | 91 bool preview_enabled_; |
91 | 92 |
92 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); | 93 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); |
93 }; | 94 }; |
94 | 95 |
95 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ | 96 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
OLD | NEW |