OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PERMISSION_BUBBLE_PERMISSION_PROMPT_H_ | 5 #ifndef CHROME_BROWSER_UI_PERMISSION_BUBBLE_PERMISSION_PROMPT_H_ |
6 #define CHROME_BROWSER_UI_PERMISSION_BUBBLE_PERMISSION_PROMPT_H_ | 6 #define CHROME_BROWSER_UI_PERMISSION_BUBBLE_PERMISSION_PROMPT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 // Important: the view must not store any of the request objects it receives | 55 // Important: the view must not store any of the request objects it receives |
56 // in this call. | 56 // in this call. |
57 virtual void Show(const std::vector<PermissionRequest*>& requests, | 57 virtual void Show(const std::vector<PermissionRequest*>& requests, |
58 const std::vector<bool>& accept_state) = 0; | 58 const std::vector<bool>& accept_state) = 0; |
59 | 59 |
60 // Returns true if the view can accept a new Show() command to coalesce | 60 // Returns true if the view can accept a new Show() command to coalesce |
61 // requests. Currently the policy is that this should return true if the view | 61 // requests. Currently the policy is that this should return true if the view |
62 // is being shown and the mouse is not over the view area (!IsMouseHovered). | 62 // is being shown and the mouse is not over the view area (!IsMouseHovered). |
63 virtual bool CanAcceptRequestUpdate() = 0; | 63 virtual bool CanAcceptRequestUpdate() = 0; |
64 | 64 |
65 // Returns true the prompt UI will manage hiding itself when the user resolves | |
tapted
2017/04/11 05:21:25
nit: true the -> true if the
Timothy Loh
2017/04/11 05:34:52
Done.
| |
66 // the prompt, on page navigation/destruction, and on tab switching. | |
67 virtual bool HidesAutomatically() = 0; | |
68 | |
65 // Hides the permission prompt. | 69 // Hides the permission prompt. |
66 virtual void Hide() = 0; | 70 virtual void Hide() = 0; |
67 | 71 |
68 // Returns true if there is a prompt currently showing. | 72 // Returns true if there is a prompt currently showing. |
69 virtual bool IsVisible() = 0; | 73 virtual bool IsVisible() = 0; |
70 | 74 |
71 // Updates where the prompt should be anchored. ex: fullscreen toggle. | 75 // Updates where the prompt should be anchored. ex: fullscreen toggle. |
72 virtual void UpdateAnchorPosition() = 0; | 76 virtual void UpdateAnchorPosition() = 0; |
73 | 77 |
74 // Returns a reference to this prompt's native window. | 78 // Returns a reference to this prompt's native window. |
75 // TODO(hcarmona): Remove this as part of the bubble API work. | 79 // TODO(hcarmona): Remove this as part of the bubble API work. |
76 virtual gfx::NativeWindow GetNativeWindow() = 0; | 80 virtual gfx::NativeWindow GetNativeWindow() = 0; |
77 }; | 81 }; |
78 | 82 |
79 #endif // CHROME_BROWSER_UI_PERMISSION_BUBBLE_PERMISSION_PROMPT_H_ | 83 #endif // CHROME_BROWSER_UI_PERMISSION_BUBBLE_PERMISSION_PROMPT_H_ |
OLD | NEW |