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

Unified Diff: chrome/browser/views/constrained_window_win.h

Issue 132047: GTK: HTTP Auth dialogs under linux. (Closed)
Patch Set: Fix for evanm Created 11 years, 6 months 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
Index: chrome/browser/views/constrained_window_win.h
diff --git a/chrome/browser/views/constrained_window_win.h b/chrome/browser/views/constrained_window_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..a91a7363de6494cf2372c56a8438d7a6b663d9aa
--- /dev/null
+++ b/chrome/browser/views/constrained_window_win.h
@@ -0,0 +1,78 @@
+// Copyright (c) 2006-2008 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_BROWSER_VIEWS_CONSTRAINED_WINDOW_WIN_H_
+#define CHROME_BROWSER_VIEWS_CONSTRAINED_WINDOW_WIN_H_
+
+#include "base/gfx/rect.h"
+#include "chrome/browser/tab_contents/constrained_window.h"
+#include "chrome/browser/tab_contents/tab_contents_delegate.h"
+#include "views/window/window_win.h"
+
+class ConstrainedTabContentsWindowDelegate;
+class ConstrainedWindowAnimation;
+class ConstrainedWindowFrameView;
+namespace views {
+class WindowDelegate;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// ConstrainedWindowWin
+//
+// A ConstrainedWindow implementation that implements a Constrained Window as
+// a child HWND with a custom window frame.
+//
+class ConstrainedWindowWin : public ConstrainedWindow,
+ public views::WindowWin {
+ public:
+ virtual ~ConstrainedWindowWin();
+
+ // Returns the TabContents that constrains this Constrained Window.
+ TabContents* owner() const { return owner_; }
+
+ // Overridden from views::Window:
+ virtual views::NonClientFrameView* CreateFrameViewForWindow();
+
+ // Overridden from ConstrainedWindow:
+ virtual void CloseConstrainedWindow();
+ virtual std::wstring GetWindowTitle() const;
+ virtual const gfx::Rect& GetCurrentBounds() const;
+
+ protected:
+ // Windows message handlers:
+ virtual void OnDestroy();
+ virtual void OnFinalMessage(HWND window);
+ virtual LRESULT OnMouseActivate(HWND window, UINT hittest_code, UINT message);
+ virtual void OnWindowPosChanged(WINDOWPOS* window_pos);
+
+ private:
+ friend class ConstrainedWindow;
+
+ // Use the static factory methods on ConstrainedWindow to construct a
+ // ConstrainedWindow.
+ ConstrainedWindowWin(TabContents* owner,
+ views::WindowDelegate* window_delegate);
+
+ // Moves this window to the front of the Z-order and registers us with the
+ // focus manager.
+ void ActivateConstrainedWindow();
+
+ // The TabContents that owns and constrains this ConstrainedWindow.
+ TabContents* owner_;
+
+ // True if focus should not be restored to whatever view was focused last
+ // when this window is destroyed.
+ bool focus_restoration_disabled_;
+
+ // Current "anchor point", the lower right point at which we render
+ // the constrained title bar.
+ gfx::Point anchor_point_;
+
+ // Current display rectangle (relative to owner_'s visible area).
+ gfx::Rect current_bounds_;
+
+ DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowWin);
+};
+
+#endif // #ifndef CHROME_BROWSER_VIEWS_CONSTRAINED_WINDOW_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698