OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_VIEW_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 void MaybeObserve(); | 74 void MaybeObserve(); |
75 void MaybeStopObserving(); | 75 void MaybeStopObserving(); |
76 | 76 |
77 // Adds |profile| to the list of profiles that have been evaluated for showing | 77 // Adds |profile| to the list of profiles that have been evaluated for showing |
78 // a bubble. Handy for things that only want to check once per profile. | 78 // a bubble. Handy for things that only want to check once per profile. |
79 void RecordProfileCheck(Profile* profile); | 79 void RecordProfileCheck(Profile* profile); |
80 // Returns false if this profile has been evaluated before. | 80 // Returns false if this profile has been evaluated before. |
81 bool IsInitialProfileCheck(Profile* profile); | 81 bool IsInitialProfileCheck(Profile* profile); |
82 | 82 |
83 // BrowserActionsContainer::Observer implementation. | 83 // BrowserActionsContainer::Observer implementation. |
84 virtual void OnBrowserActionsContainerAnimationEnded() OVERRIDE; | 84 virtual void OnBrowserActionsContainerAnimationEnded() override; |
85 virtual void OnBrowserActionsContainerDestroyed() OVERRIDE; | 85 virtual void OnBrowserActionsContainerDestroyed() override; |
86 | 86 |
87 // Sets the stage for highlighting extensions and then showing the bubble | 87 // Sets the stage for highlighting extensions and then showing the bubble |
88 // controlled by |controller|, anchored to |anchor_view|. | 88 // controlled by |controller|, anchored to |anchor_view|. |
89 void PrepareToHighlightExtensions( | 89 void PrepareToHighlightExtensions( |
90 scoped_ptr<ExtensionMessageBubbleController> controller, | 90 scoped_ptr<ExtensionMessageBubbleController> controller, |
91 views::View* anchor_view); | 91 views::View* anchor_view); |
92 | 92 |
93 // Inform the ExtensionToolbarModel to highlight the appropriate extensions. | 93 // Inform the ExtensionToolbarModel to highlight the appropriate extensions. |
94 void HighlightExtensions(); | 94 void HighlightExtensions(); |
95 | 95 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 public views::BubbleDelegateView, | 147 public views::BubbleDelegateView, |
148 public views::ButtonListener, | 148 public views::ButtonListener, |
149 public views::LinkListener { | 149 public views::LinkListener { |
150 public: | 150 public: |
151 ExtensionMessageBubbleView( | 151 ExtensionMessageBubbleView( |
152 views::View* anchor_view, | 152 views::View* anchor_view, |
153 views::BubbleBorder::Arrow arrow_location, | 153 views::BubbleBorder::Arrow arrow_location, |
154 scoped_ptr<ExtensionMessageBubbleController> controller); | 154 scoped_ptr<ExtensionMessageBubbleController> controller); |
155 | 155 |
156 // ExtensionMessageBubble methods. | 156 // ExtensionMessageBubble methods. |
157 virtual void OnActionButtonClicked(const base::Closure& callback) OVERRIDE; | 157 virtual void OnActionButtonClicked(const base::Closure& callback) override; |
158 virtual void OnDismissButtonClicked(const base::Closure& callback) OVERRIDE; | 158 virtual void OnDismissButtonClicked(const base::Closure& callback) override; |
159 virtual void OnLinkClicked(const base::Closure& callback) OVERRIDE; | 159 virtual void OnLinkClicked(const base::Closure& callback) override; |
160 virtual void Show() OVERRIDE; | 160 virtual void Show() override; |
161 | 161 |
162 // WidgetObserver methods. | 162 // WidgetObserver methods. |
163 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; | 163 virtual void OnWidgetDestroying(views::Widget* widget) override; |
164 | 164 |
165 private: | 165 private: |
166 virtual ~ExtensionMessageBubbleView(); | 166 virtual ~ExtensionMessageBubbleView(); |
167 | 167 |
168 void ShowBubble(); | 168 void ShowBubble(); |
169 | 169 |
170 // views::BubbleDelegateView overrides: | 170 // views::BubbleDelegateView overrides: |
171 virtual void Init() OVERRIDE; | 171 virtual void Init() override; |
172 | 172 |
173 // views::ButtonListener implementation. | 173 // views::ButtonListener implementation. |
174 virtual void ButtonPressed(views::Button* sender, | 174 virtual void ButtonPressed(views::Button* sender, |
175 const ui::Event& event) OVERRIDE; | 175 const ui::Event& event) override; |
176 | 176 |
177 // views::LinkListener implementation. | 177 // views::LinkListener implementation. |
178 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 178 virtual void LinkClicked(views::Link* source, int event_flags) override; |
179 | 179 |
180 // views::View implementation. | 180 // views::View implementation. |
181 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 181 virtual void GetAccessibleState(ui::AXViewState* state) override; |
182 virtual void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details) | 182 virtual void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details) |
183 OVERRIDE; | 183 override; |
184 | 184 |
185 // The controller for this bubble. | 185 // The controller for this bubble. |
186 scoped_ptr<ExtensionMessageBubbleController> controller_; | 186 scoped_ptr<ExtensionMessageBubbleController> controller_; |
187 | 187 |
188 // The view this bubble is anchored against. | 188 // The view this bubble is anchored against. |
189 views::View* anchor_view_; | 189 views::View* anchor_view_; |
190 | 190 |
191 // The headline, labels and buttons on the bubble. | 191 // The headline, labels and buttons on the bubble. |
192 views::Label* headline_; | 192 views::Label* headline_; |
193 views::Link* learn_more_; | 193 views::Link* learn_more_; |
(...skipping 11 matching lines...) Expand all Loading... |
205 base::Closure link_callback_; | 205 base::Closure link_callback_; |
206 | 206 |
207 base::WeakPtrFactory<ExtensionMessageBubbleView> weak_factory_; | 207 base::WeakPtrFactory<ExtensionMessageBubbleView> weak_factory_; |
208 | 208 |
209 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleView); | 209 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleView); |
210 }; | 210 }; |
211 | 211 |
212 } // namespace extensions | 212 } // namespace extensions |
213 | 213 |
214 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_VIEW_H_ | 214 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_VIEW_H_ |
OLD | NEW |