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

Side by Side Diff: ui/views/bubble/tray_bubble_view.h

Issue 2835233005: Revert of Introduce a type of View background that stays in sync with its host (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « ui/views/background.cc ('k') | ui/views/bubble/tray_bubble_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ 5 #ifndef UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_
6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ 6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/optional.h"
12 #include "ui/views/bubble/bubble_dialog_delegate.h" 11 #include "ui/views/bubble/bubble_dialog_delegate.h"
13 #include "ui/views/mouse_watcher.h" 12 #include "ui/views/mouse_watcher.h"
14 #include "ui/views/views_export.h" 13 #include "ui/views/views_export.h"
15 14
16 namespace views { 15 namespace views {
17 class BoxLayout; 16 class BoxLayout;
18 class View; 17 class View;
19 class Widget; 18 class Widget;
20 } 19 }
21 20
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 76
78 struct VIEWS_EXPORT InitParams { 77 struct VIEWS_EXPORT InitParams {
79 InitParams(AnchorAlignment anchor_alignment, int min_width, int max_width); 78 InitParams(AnchorAlignment anchor_alignment, int min_width, int max_width);
80 InitParams(const InitParams& other); 79 InitParams(const InitParams& other);
81 AnchorAlignment anchor_alignment; 80 AnchorAlignment anchor_alignment;
82 int min_width; 81 int min_width;
83 int max_width; 82 int max_width;
84 int max_height; 83 int max_height;
85 bool can_activate; 84 bool can_activate;
86 bool close_on_deactivate; 85 bool close_on_deactivate;
87 // If not provided, the bg color will be derived from the NativeTheme. 86 SkColor bg_color;
88 base::Optional<SkColor> bg_color;
89 }; 87 };
90 88
91 // Constructs and returns a TrayBubbleView. |init_params| may be modified. 89 // Constructs and returns a TrayBubbleView. |init_params| may be modified.
92 static TrayBubbleView* Create(views::View* anchor, 90 static TrayBubbleView* Create(views::View* anchor,
93 Delegate* delegate, 91 Delegate* delegate,
94 InitParams* init_params); 92 InitParams* init_params);
95 93
96 ~TrayBubbleView() override; 94 ~TrayBubbleView() override;
97 95
98 // Sets up animations, and show the bubble. Must occur after CreateBubble() 96 // Sets up animations, and show the bubble. Must occur after CreateBubble()
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 173
176 // Used to find any mouse movements. 174 // Used to find any mouse movements.
177 std::unique_ptr<MouseWatcher> mouse_watcher_; 175 std::unique_ptr<MouseWatcher> mouse_watcher_;
178 176
179 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); 177 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView);
180 }; 178 };
181 179
182 } // namespace views 180 } // namespace views
183 181
184 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ 182 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/background.cc ('k') | ui/views/bubble/tray_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698