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

Unified Diff: chrome_frame/infobars/internal/host_window.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/infobars/internal/displaced_window.cc ('k') | chrome_frame/infobars/internal/host_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/infobars/internal/host_window.h
===================================================================
--- chrome_frame/infobars/internal/host_window.h (revision 0)
+++ chrome_frame/infobars/internal/host_window.h (revision 0)
@@ -0,0 +1,48 @@
+// 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_INTERNAL_HOST_WINDOW_H_
+#define CHROME_FRAME_INFOBARS_INTERNAL_HOST_WINDOW_H_
+
+#include "base/basictypes.h"
+#include "chrome_frame/infobars/internal/subclassing_window.h"
+
+class DisplacedWindowManager;
+
+// HostWindowManager observes the HWND passed to Initialize and:
+// 1) Monitors the lifecycle of a specific child window (as identified by
+// FindDisplacedWindow).
+// 2) Intercepts NCCALCSIZE events on the child window, allowing the client to
+// modify the child window's requested dimensions.
+// 3) Allows the client to request a recalculation of the child window's
+// dimensions (resulting in a callback as in [2]).
+//
+// See documentation of SubclasingWindowWithDelegate for further information.
+class HostWindowManager
+ : public SubclassingWindowWithDelegate<HostWindowManager> {
+ public:
+ HostWindowManager();
+ virtual ~HostWindowManager();
+
+ // Triggers an immediate re-evaluation of the dimensions of the displaced
+ // window. Delegate::AdjustDisplacedWindowDimensions will be called with the
+ // natural dimensions of the displaced window.
+ void UpdateLayout();
+
+ private:
+ class DisplacedWindowDelegate;
+ friend class DisplacedWindowDelegate;
+
+ // Finds the window to be displaced and instantiate a DisplacedWindowManager
+ // for it if one does not already exist. Returns true if
+ // displaced_window_manager_ is non-NULL at the end of the call.
+ bool FindDisplacedWindow(HWND old_window);
+
+ // Subclasses and observes changes to the displaced window.
+ DisplacedWindowManager* displaced_window_manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(HostWindowManager);
+}; // class HostWindowManager
+
+#endif // CHROME_FRAME_INFOBARS_INTERNAL_HOST_WINDOW_H_
Property changes on: chrome_frame\infobars\internal\host_window.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome_frame/infobars/internal/displaced_window.cc ('k') | chrome_frame/infobars/internal/host_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698