Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: chrome/browser/ui/views/extensions/extension_message_bubble_view.h

Issue 577523002: Refactoring the WeakPtrFactory initialization in chrome/browser/ui/views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolved Rebase issues Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 base::WeakPtrFactory<ExtensionMessageBubbleView> weak_factory_;
186
187 // The controller for this bubble. 185 // The controller for this bubble.
188 scoped_ptr<ExtensionMessageBubbleController> controller_; 186 scoped_ptr<ExtensionMessageBubbleController> controller_;
189 187
190 // The view this bubble is anchored against. 188 // The view this bubble is anchored against.
191 views::View* anchor_view_; 189 views::View* anchor_view_;
192 190
193 // The headline, labels and buttons on the bubble. 191 // The headline, labels and buttons on the bubble.
194 views::Label* headline_; 192 views::Label* headline_;
195 views::Link* learn_more_; 193 views::Link* learn_more_;
196 views::LabelButton* action_button_; 194 views::LabelButton* action_button_;
197 views::LabelButton* dismiss_button_; 195 views::LabelButton* dismiss_button_;
198 196
199 // All actions (link, button, esc) close the bubble, but we need to 197 // All actions (link, button, esc) close the bubble, but we need to
200 // make sure we don't send dismiss if the link was clicked. 198 // make sure we don't send dismiss if the link was clicked.
201 bool link_clicked_; 199 bool link_clicked_;
202 bool action_taken_; 200 bool action_taken_;
203 201
204 // Callbacks into the controller. 202 // Callbacks into the controller.
205 base::Closure action_callback_; 203 base::Closure action_callback_;
206 base::Closure dismiss_callback_; 204 base::Closure dismiss_callback_;
207 base::Closure link_callback_; 205 base::Closure link_callback_;
208 206
207 base::WeakPtrFactory<ExtensionMessageBubbleView> weak_factory_;
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698