| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 if the prompt UI will manage hiding itself when the user | 65 // Returns true if the prompt UI will manage hiding itself when the user |
| 66 // resolves the prompt, on page navigation/destruction, and on tab switching. | 66 // resolves the prompt, on page navigation/destruction, and on tab switching. |
| 67 virtual bool HidesAutomatically() = 0; | 67 virtual bool HidesAutomatically() = 0; |
| 68 | 68 |
| 69 // Hides the permission prompt. | 69 // Hides the permission prompt. |
| 70 virtual void Hide() = 0; | 70 virtual void Hide() = 0; |
| 71 | 71 |
| 72 // Returns true if there is a prompt currently showing. | |
| 73 virtual bool IsVisible() = 0; | |
| 74 | |
| 75 // Updates where the prompt should be anchored. ex: fullscreen toggle. | 72 // Updates where the prompt should be anchored. ex: fullscreen toggle. |
| 76 virtual void UpdateAnchorPosition() = 0; | 73 virtual void UpdateAnchorPosition() = 0; |
| 77 | 74 |
| 78 // Returns a reference to this prompt's native window. | 75 // Returns a reference to this prompt's native window. |
| 79 // TODO(hcarmona): Remove this as part of the bubble API work. | 76 // TODO(hcarmona): Remove this as part of the bubble API work. |
| 80 virtual gfx::NativeWindow GetNativeWindow() = 0; | 77 virtual gfx::NativeWindow GetNativeWindow() = 0; |
| 81 }; | 78 }; |
| 82 | 79 |
| 83 #endif // CHROME_BROWSER_UI_PERMISSION_BUBBLE_PERMISSION_PROMPT_H_ | 80 #endif // CHROME_BROWSER_UI_PERMISSION_BUBBLE_PERMISSION_PROMPT_H_ |
| OLD | NEW |