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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h

Issue 2762893002: Fix a lifetime issue in ToolbarActionsBarBubbleViews (Closed)
Patch Set: Update comment Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_VIEWS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h"
11 #include "ui/views/bubble/bubble_dialog_delegate.h" 12 #include "ui/views/bubble/bubble_dialog_delegate.h"
12 #include "ui/views/controls/button/button.h" 13 #include "ui/views/controls/button/button.h"
13 #include "ui/views/controls/link_listener.h" 14 #include "ui/views/controls/link_listener.h"
14 15
15 class ToolbarActionsBarBubbleDelegate;
16 class ToolbarActionsBarBubbleViewsTest; 16 class ToolbarActionsBarBubbleViewsTest;
17 17
18 namespace views { 18 namespace views {
19 class Label; 19 class Label;
20 class Link; 20 class Link;
21 } 21 }
22 22
23 class ToolbarActionsBarBubbleViews : public views::BubbleDialogDelegateView, 23 class ToolbarActionsBarBubbleViews : public views::BubbleDialogDelegateView,
24 public views::LinkListener { 24 public views::LinkListener {
25 public: 25 public:
(...skipping 22 matching lines...) Expand all
48 bool Close() override; 48 bool Close() override;
49 int GetDialogButtons() const override; 49 int GetDialogButtons() const override;
50 int GetDefaultDialogButton() const override; 50 int GetDefaultDialogButton() const override;
51 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 51 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
52 void Init() override; 52 void Init() override;
53 53
54 // views::LinkListener: 54 // views::LinkListener:
55 void LinkClicked(views::Link* source, int event_flags) override; 55 void LinkClicked(views::Link* source, int event_flags) override;
56 56
57 std::unique_ptr<ToolbarActionsBarBubbleDelegate> delegate_; 57 std::unique_ptr<ToolbarActionsBarBubbleDelegate> delegate_;
58 ToolbarActionsBarBubbleDelegate::CloseAction close_reason_;
58 views::Label* item_list_; 59 views::Label* item_list_;
59 views::Link* link_; 60 views::Link* link_;
60 const bool anchored_to_action_; 61 const bool anchored_to_action_;
61 62
62 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarBubbleViews); 63 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarBubbleViews);
63 }; 64 };
64 65
65 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_VIEWS_H_ 66 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698