Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: chrome_frame/infobars/manager.h

Issue 4766003: Preview CL for adding an Infobar facility to Google Chrome Frame.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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);
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.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698