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

Side by Side Diff: components/bubble/bubble_close_reason.h

Issue 1572743002: Make sure bubbles in Views default to close before their RenderFrameHosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_BUBBLE_BUBBLE_CLOSE_REASON_H_ 5 #ifndef COMPONENTS_BUBBLE_BUBBLE_CLOSE_REASON_H_
6 #define COMPONENTS_BUBBLE_BUBBLE_CLOSE_REASON_H_ 6 #define COMPONENTS_BUBBLE_BUBBLE_CLOSE_REASON_H_
7 7
8 // List of reasons why a bubble might close. These correspond to various events 8 // List of reasons why a bubble might close. These correspond to various events
9 // from the UI. Not all platforms will receive all events. 9 // from the UI. Not all platforms will receive all events.
10 enum BubbleCloseReason { 10 enum BubbleCloseReason {
11 // The bubble WILL be closed regardless of return value for |ShouldClose|. 11 // The bubble WILL be closed regardless of return value for |ShouldClose|.
12 // Ex: The bubble's parent window is being destroyed. 12 // Ex: The bubble's parent window is being destroyed.
13 BUBBLE_CLOSE_FORCED, 13 BUBBLE_CLOSE_FORCED,
Peter Kasting 2016/01/09 01:19:35 Can't we just use this? We only need the new valu
Jeffrey Yasskin 2016/01/09 02:22:34 If a bubble needs to avoid closing when a frame is
Peter Kasting 2016/01/09 02:26:18 Ah.
hcarmona 2016/01/11 19:07:22 If we have a reason to close a bubble, it should b
Peter Kasting 2016/01/11 21:42:19 My argument is really that "force close" _is_ the
14 14
15 // Bubble was closed without any user interaction. 15 // Bubble was closed without any user interaction.
16 BUBBLE_CLOSE_FOCUS_LOST, 16 BUBBLE_CLOSE_FOCUS_LOST,
17 17
18 // User did not interact with the bubble, but changed tab. 18 // User did not interact with the bubble, but changed tab.
19 BUBBLE_CLOSE_TABSWITCHED, 19 BUBBLE_CLOSE_TABSWITCHED,
20 20
21 // User did not interact with the bubble, but detached the tab. 21 // User did not interact with the bubble, but detached the tab.
22 BUBBLE_CLOSE_TABDETACHED, 22 BUBBLE_CLOSE_TABDETACHED,
23 23
24 // User dismissed the bubble. (ESC, close, etc.) 24 // User dismissed the bubble. (ESC, close, etc.)
25 BUBBLE_CLOSE_USER_DISMISSED, 25 BUBBLE_CLOSE_USER_DISMISSED,
26 26
27 // There has been a navigation event. (Link, URL typed, refresh, etc.) 27 // There has been a navigation event. (Link, URL typed, refresh, etc.)
28 BUBBLE_CLOSE_NAVIGATED, 28 BUBBLE_CLOSE_NAVIGATED,
29 29
30 // The parent window has entered or exited fullscreen mode. Will also be 30 // The parent window has entered or exited fullscreen mode. Will also be
31 // called for immersive fullscreen. 31 // called for immersive fullscreen.
32 BUBBLE_CLOSE_FULLSCREEN_TOGGLED, 32 BUBBLE_CLOSE_FULLSCREEN_TOGGLED,
33 33
34 // The user selected an affirmative response in the bubble. 34 // The user selected an affirmative response in the bubble.
35 BUBBLE_CLOSE_ACCEPTED, 35 BUBBLE_CLOSE_ACCEPTED,
36 36
37 // The user selected a negative response in the bubble. 37 // The user selected a negative response in the bubble.
38 BUBBLE_CLOSE_CANCELED, 38 BUBBLE_CLOSE_CANCELED,
39
40 // A frame was closed, so references in the bubble may be invalid.
hcarmona 2016/01/11 19:07:22 Let's be more specific here about what references
41 BUBBLE_CLOSE_FRAME_DESTROYED,
39 }; 42 };
40 43
41 #endif // COMPONENTS_BUBBLE_BUBBLE_CLOSE_REASON_H_ 44 #endif // COMPONENTS_BUBBLE_BUBBLE_CLOSE_REASON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698