Loosen up heuristics for detecting account creation forms.
[chromium-blink-merge.git] / chrome_frame / infobars / infobar_manager.h
blobe4dd3b7be3a5a05c3423455cb489db7606d93f9d
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.
5 #ifndef CHROME_FRAME_INFOBARS_INFOBAR_MANAGER_H_
6 #define CHROME_FRAME_INFOBARS_INFOBAR_MANAGER_H_
8 #include <windows.h>
10 class InfobarContent;
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
19 // Creates and manages infobars at the top or bottom of an IE content window.
20 // Instances must only be retrieved and used within the UI thread of the IE
21 // content window.
22 class InfobarManager {
23 public:
24 // Returns an InfobarManager for the specified IE tab window. Caller does not
25 // own the pointer (resources will be freed when the window is destroyed).
27 // The pointer may be invalidated by further processing of window events, and
28 // as such should be immediately discarded after use.
30 // Returns NULL in case of failure.
31 static InfobarManager* Get(HWND tab_window);
33 virtual ~InfobarManager();
35 // Shows the supplied content in an infobar of the specified type.
36 // Normally, InfobarContent::InstallInFrame will be called with an interface
37 // the content may use to interact with the Infobar facility.
39 // InfobarContent is deleted when the Infobar facility is finished with the
40 // content (either through failure or when successfully hidden).
41 virtual bool Show(InfobarContent* content, InfobarType type) = 0;
43 // Hides the infobar of the specified type.
44 virtual void Hide(InfobarType type) = 0;
46 // Hides all infobars.
47 virtual void HideAll() = 0;
48 }; // class InfobarManager
50 #endif // CHROME_FRAME_INFOBARS_INFOBAR_MANAGER_H_