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

Unified Diff: chrome_frame/infobars/content.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 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/chrome_frame.gyp ('k') | chrome_frame/infobars/internal/displaced_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/infobars/content.h
===================================================================
--- chrome_frame/infobars/content.h (revision 0)
+++ chrome_frame/infobars/content.h (revision 0)
@@ -0,0 +1,50 @@
+// 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_CONTENT_H_
+#define CHROME_FRAME_INFOBARS_CONTENT_H_
+
+#include <windows.h>
+
+// Provides an interface between content to be displayed in an infobar and the
+// infobar facility. Pass an instance of your implementation to
+// InfobarManager::Show, which will result in a call to InstallInFrame to
+// initialize the InfobarContent.
+//
+// The instance will be deleted by the infobar facility when it is no longer
+// being displayed (or immediately, in the case of a failure to display).
+class InfobarContent {
+ public:
+ // Provides access to the content's parent window and allows the
+ // InfobarContent to close itself, such as in response to user interaction.
+ class Frame {
+ public:
+ virtual ~Frame() {}
+
+ // Returns the window in which the content should display itself.
+ virtual HWND GetFrameWindow() = 0;
+
+ // Initiates closing of the infobar.
+ virtual void CloseInfobar() = 0;
+ }; // class Frame
+
+ virtual ~InfobarContent() {}
+
+ // Prepares the content to display in the provided frame.
+ //
+ // The frame pointer remains valid until the InfobarContent instance is
+ // deleted.
+ virtual bool InstallInFrame(Frame* frame) = 0;
+
+ // Provides the content with the dimensions available to it for display.
+ // Dimensions are relative to the origin of the frame window.
+ virtual void SetDimensions(const RECT& dimensions) = 0;
+
+ // Finds the desired value for one dimension given a fixed value for the other
+ // dimension. The fixed dimension parameter is non-zero whereas the requested
+ // dimension parameter will be zero.
+ virtual size_t GetDesiredSize(size_t width, size_t height) = 0;
+}; // class InfobarContent
+
+#endif // CHROME_FRAME_INFOBARS_CONTENT_H_
Property changes on: chrome_frame\infobars\content.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome_frame/chrome_frame.gyp ('k') | chrome_frame/infobars/internal/displaced_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698