summaryrefslogtreecommitdiffstats
path: root/ceee/ie/plugin/bho/infobar_manager.h
diff options
context:
space:
mode:
authorinitial.commit@chromium.org <initial.commit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-02 02:14:31 +0000
committerinitial.commit@chromium.org <initial.commit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-02 02:14:31 +0000
commit5a7bdf208c28c210b39cff63d1cf91302b02821b (patch)
tree5ff484561562f78b29d2670168a9e3b40b48dcab /ceee/ie/plugin/bho/infobar_manager.h
parent26a54a5e0f4603c8fda2fe51789d331125993c9a (diff)
downloadchromium_src-5a7bdf208c28c210b39cff63d1cf91302b02821b.zip
chromium_src-5a7bdf208c28c210b39cff63d1cf91302b02821b.tar.gz
chromium_src-5a7bdf208c28c210b39cff63d1cf91302b02821b.tar.bz2
Checking in the initial version of CEEE (Chrome Extensions Execution
Environment), an optional feature of Chrome Frame that acts as an adapter layer for a subset of the Chrome Extension APIs. This enables extensions that stick to the supported subset of APIs to work in the context of Chrome Frame with minimal or sometimes no changes. See http://www.chromium.org/developers/design-documents/ceee for an overview of the design of CEEE. TEST=unit tests (run ceee/smoke_tests.bat as an administrator on Windows) BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64712 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ceee/ie/plugin/bho/infobar_manager.h')
-rw-r--r--ceee/ie/plugin/bho/infobar_manager.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/ceee/ie/plugin/bho/infobar_manager.h b/ceee/ie/plugin/bho/infobar_manager.h
new file mode 100644
index 0000000..dead924
--- /dev/null
+++ b/ceee/ie/plugin/bho/infobar_manager.h
@@ -0,0 +1,67 @@
+// 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.
+//
+// @file
+// Manager for infobar windows.
+
+#ifndef CEEE_IE_PLUGIN_BHO_INFOBAR_MANAGER_H_
+#define CEEE_IE_PLUGIN_BHO_INFOBAR_MANAGER_H_
+
+#include "base/scoped_ptr.h"
+#include "base/singleton.h"
+#include "ceee/ie/plugin/bho/infobar_window.h"
+#include "ceee/ie/plugin/bho/web_browser_events_source.h"
+
+namespace infobar_api {
+
+// InfobarManager creates and manages infobars, which are displayed at the top
+// or bottom of IE content window.
+class InfobarManager : public InfobarWindow::Delegate,
+ public WebBrowserEventsSource::Sink {
+ public:
+ explicit InfobarManager(HWND tab_window);
+
+ // Shows the infobar of the specified type and navigates it to the specified
+ // URL.
+ HRESULT Show(InfobarType type, int max_height, const std::wstring& url,
+ bool slide);
+ // Hides the infobar of the specified type.
+ HRESULT Hide(InfobarType type);
+ // Hides all infobars.
+ void HideAll();
+
+ // Implementation of InfobarWindow::Delegate.
+ // Finds the handle of the container window.
+ virtual HWND GetContainerWindow();
+ // Informs about window.close() event.
+ virtual void OnWindowClose(InfobarType type);
+
+ private:
+ class ContainerWindow;
+
+ // The HWND of the tab window the infobars are associated with.
+ HWND tab_window_;
+
+ // Parent window for IE content window.
+ scoped_ptr<ContainerWindow> container_window_;
+
+ // Infobar windows.
+ scoped_ptr<InfobarWindow> infobars_[END_OF_INFOBAR_TYPE];
+
+ // ContainerWindow callbacks.
+ // Callback for WM_NCCALCSIZE.
+ void OnContainerWindowNcCalcSize(RECT* rect);
+ // Callback for messages on size or position change.
+ void OnContainerWindowUpdatePosition();
+ // Callback for message requesting closing the infobar.
+ void OnContainerWindowDelayedCloseInfobar(InfobarType type);
+ // Callback for WM_DESTROY.
+ void OnContainerWindowDestroy();
+
+ DISALLOW_COPY_AND_ASSIGN(InfobarManager);
+};
+
+} // namespace infobar_api
+
+#endif // CEEE_IE_PLUGIN_BHO_INFOBAR_MANAGER_H_