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_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "chrome/browser/ui/extensions/extension_action_view_controller.h" | 12 #include "chrome/browser/ui/extensions/extension_action_view_controller.h" |
13 #include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h" | 13 #include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h" |
14 #include "ui/views/context_menu_controller.h" | 14 #include "ui/views/context_menu_controller.h" |
15 #include "ui/views/controls/image_view.h" | 15 #include "ui/views/controls/image_view.h" |
16 | 16 |
17 class Browser; | 17 class Browser; |
18 class ExtensionAction; | 18 class ExtensionAction; |
19 class ExtensionActionViewController; | 19 class ExtensionActionViewController; |
20 class LocationBarView; | 20 class LocationBarView; |
21 | 21 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 views::FocusManager* GetFocusManagerForAccelerator() override; | 70 views::FocusManager* GetFocusManagerForAccelerator() override; |
71 views::View* GetReferenceViewForPopup() override; | 71 views::View* GetReferenceViewForPopup() override; |
72 content::WebContents* GetCurrentWebContents() const override; | 72 content::WebContents* GetCurrentWebContents() const override; |
73 | 73 |
74 // views::ContextMenuController: | 74 // views::ContextMenuController: |
75 void ShowContextMenuForView(views::View* source, | 75 void ShowContextMenuForView(views::View* source, |
76 const gfx::Point& point, | 76 const gfx::Point& point, |
77 ui::MenuSourceType source_type) override; | 77 ui::MenuSourceType source_type) override; |
78 | 78 |
79 // The controller for this ExtensionAction view. | 79 // The controller for this ExtensionAction view. |
80 scoped_ptr<ExtensionActionViewController> view_controller_; | 80 std::unique_ptr<ExtensionActionViewController> view_controller_; |
81 | 81 |
82 // The location bar view that owns us. | 82 // The location bar view that owns us. |
83 LocationBarView* owner_; | 83 LocationBarView* owner_; |
84 | 84 |
85 // The string to show for a tooltip; | 85 // The string to show for a tooltip; |
86 std::string tooltip_; | 86 std::string tooltip_; |
87 | 87 |
88 // This is used for post-install visual feedback. The page_action icon is | 88 // This is used for post-install visual feedback. The page_action icon is |
89 // briefly shown even if it hasn't been enabled by its extension. | 89 // briefly shown even if it hasn't been enabled by its extension. |
90 bool preview_enabled_; | 90 bool preview_enabled_; |
91 | 91 |
92 // Responsible for running the menu. | 92 // Responsible for running the menu. |
93 scoped_ptr<views::MenuRunner> menu_runner_; | 93 std::unique_ptr<views::MenuRunner> menu_runner_; |
94 | 94 |
95 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); | 95 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); |
96 }; | 96 }; |
97 | 97 |
98 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ | 98 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
OLD | NEW |