| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_FRAME_INFOBARS_MANAGER_H_ |
| 6 #define CHROME_FRAME_INFOBARS_MANAGER_H_ |
| 7 |
| 8 #include <windows.h> |
| 9 |
| 10 #include "chrome_frame/infobars/content.h" |
| 11 |
| 12 enum InfobarType { |
| 13 FIRST_INFOBAR_TYPE = 0, |
| 14 TOP_INFOBAR = 0, // Infobar at the top. |
| 15 BOTTOM_INFOBAR = 1, // Infobar at the bottom. |
| 16 END_OF_INFOBAR_TYPE = 2 |
| 17 }; |
| 18 |
| 19 // InfobarManager creates and manages infobars, which are displayed at the top |
| 20 // or bottom of IE content window. |
| 21 class InfobarManager { |
| 22 public: |
| 23 static InfobarManager* Get(HWND tab_window); |
| 24 |
| 25 virtual ~InfobarManager() {} |
| 26 // Shows the supplied content in an infobar of the specified type. |
| 27 // Normally, InfobarContent::InstallInFrame will be called with an interface |
| 28 // the content may use to interact with the Infobar facility. |
| 29 // |
| 30 // InfobarContent::Reset() is guaranteed to be called when the Infobar |
| 31 // facility is finished with the content (either through failure or when |
| 32 // successfully hidden). |
| 33 // |
| 34 // The InfobarContent implementation is responsible for freeing itself and its |
| 35 // resources at any time during or after the call to Reset(). |
| 36 virtual bool Show(InfobarContent *content, InfobarType type) = 0; |
| 37 // Hides the infobar of the specified type. |
| 38 virtual void Hide(InfobarType type) = 0; |
| 39 // Hides all infobars. |
| 40 virtual void HideAll() = 0; |
| 41 }; |
| 42 |
| 43 #endif // CHROME_FRAME_INFOBARS_MANAGER_H_ |
| OLD | NEW |