Chromium Code Reviews| Index: chrome_frame/infobars/manager.h |
| =================================================================== |
| --- chrome_frame/infobars/manager.h (revision 0) |
| +++ chrome_frame/infobars/manager.h (revision 0) |
| @@ -0,0 +1,43 @@ |
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_FRAME_INFOBARS_MANAGER_H_ |
| +#define CHROME_FRAME_INFOBARS_MANAGER_H_ |
| + |
| +#include <windows.h> |
| + |
| +#include "chrome_frame/infobars/content.h" |
| + |
| +enum InfobarType { |
| + FIRST_INFOBAR_TYPE = 0, |
| + TOP_INFOBAR = 0, // Infobar at the top. |
| + BOTTOM_INFOBAR = 1, // Infobar at the bottom. |
| + END_OF_INFOBAR_TYPE = 2 |
| +}; |
| + |
| +// InfobarManager creates and manages infobars, which are displayed at the top |
| +// or bottom of IE content window. |
| +class InfobarManager { |
| + public: |
| + static InfobarManager* Get(HWND tab_window); |
|
grt (UTC plus 2)
2010/11/25 18:00:13
Please document ownership: does caller own the man
erikwright (departed)
2010/12/01 20:05:52
Thanks.
|
| + |
| + virtual ~InfobarManager() {} |
| + // Shows the supplied content in an infobar of the specified type. |
| + // Normally, InfobarContent::InstallInFrame will be called with an interface |
| + // the content may use to interact with the Infobar facility. |
| + // |
| + // InfobarContent::Reset() is guaranteed to be called when the Infobar |
| + // facility is finished with the content (either through failure or when |
| + // successfully hidden). |
| + // |
| + // The InfobarContent implementation is responsible for freeing itself and its |
| + // resources at any time during or after the call to Reset(). |
| + virtual bool Show(InfobarContent *content, InfobarType type) = 0; |
| + // Hides the infobar of the specified type. |
| + virtual void Hide(InfobarType type) = 0; |
| + // Hides all infobars. |
| + virtual void HideAll() = 0; |
| +}; |
| + |
| +#endif // CHROME_FRAME_INFOBARS_MANAGER_H_ |
| Property changes on: chrome_frame\infobars\manager.h |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |