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 COMPONENTS_WEB_MODAL_POPUP_MANAGER_H_ | 5 #ifndef COMPONENTS_WEB_MODAL_POPUP_MANAGER_H_ |
6 #define COMPONENTS_WEB_MODAL_POPUP_MANAGER_H_ | 6 #define COMPONENTS_WEB_MODAL_POPUP_MANAGER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "components/web_modal/single_popup_manager.h" | 10 #include "components/web_modal/single_popup_manager.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 virtual void ShowModalDialog(NativePopup popup, | 41 virtual void ShowModalDialog(NativePopup popup, |
42 content::WebContents* web_contents); | 42 content::WebContents* web_contents); |
43 | 43 |
44 // Returns true if a web modal dialog is active and not closed in the | 44 // Returns true if a web modal dialog is active and not closed in the |
45 // given |web_contents|. Note: this is intended for legacy use only; it will | 45 // given |web_contents|. Note: this is intended for legacy use only; it will |
46 // be deleted at some point -- new code shouldn't use it. | 46 // be deleted at some point -- new code shouldn't use it. |
47 virtual bool IsWebModalDialogActive( | 47 virtual bool IsWebModalDialogActive( |
48 const content::WebContents* web_contents) const; | 48 const content::WebContents* web_contents) const; |
49 | 49 |
50 // Called when a NativePopup we own is about to be closed. | 50 // Called when a NativePopup we own is about to be closed. |
51 virtual void WillClose(NativePopup popup) OVERRIDE; | 51 virtual void WillClose(NativePopup popup) override; |
52 | 52 |
53 // Called by views code to re-activate popups anchored to a particular tab | 53 // Called by views code to re-activate popups anchored to a particular tab |
54 // when that tab gets focus. Note that depending on the situation, more than | 54 // when that tab gets focus. Note that depending on the situation, more than |
55 // one popup may actually be shown (depending on overlappability). The | 55 // one popup may actually be shown (depending on overlappability). The |
56 // semantics are that the popups that would have been displayed had the tab | 56 // semantics are that the popups that would have been displayed had the tab |
57 // never lost focus are re-focused when tab focus is regained. | 57 // never lost focus are re-focused when tab focus is regained. |
58 virtual void WasFocused(const content::WebContents* web_contents); | 58 virtual void WasFocused(const content::WebContents* web_contents); |
59 | 59 |
60 // WebContentsUserData-alike API for retrieving the associated window | 60 // WebContentsUserData-alike API for retrieving the associated window |
61 // PopupManager from a |web_contents|. Any window which doesn't have a popup | 61 // PopupManager from a |web_contents|. Any window which doesn't have a popup |
(...skipping 12 matching lines...) Expand all Loading... |
74 WebContentsModalDialogHost* host_; | 74 WebContentsModalDialogHost* host_; |
75 | 75 |
76 base::WeakPtrFactory<PopupManager> weak_factory_; | 76 base::WeakPtrFactory<PopupManager> weak_factory_; |
77 | 77 |
78 DISALLOW_COPY_AND_ASSIGN(PopupManager); | 78 DISALLOW_COPY_AND_ASSIGN(PopupManager); |
79 }; | 79 }; |
80 | 80 |
81 } // namespace web_modal | 81 } // namespace web_modal |
82 | 82 |
83 #endif // COMPONENTS_WEB_MODAL_POPUP_MANAGER_H_ | 83 #endif // COMPONENTS_WEB_MODAL_POPUP_MANAGER_H_ |
OLD | NEW |