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

Side by Side Diff: chrome/browser/views/constrained_window_impl.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 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.
4
5 #ifndef CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H_
6 #define CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H_
7
8 #include "base/gfx/rect.h"
9 #include "chrome/browser/tab_contents/constrained_window.h"
10 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
11 #include "views/window/window_win.h"
12
13 class ConstrainedTabContentsWindowDelegate;
14 class ConstrainedWindowAnimation;
15 class ConstrainedWindowFrameView;
16 namespace views {
17 class WindowDelegate;
18 }
19
20 ///////////////////////////////////////////////////////////////////////////////
21 // ConstrainedWindowImpl
22 //
23 // A ConstrainedWindow implementation that implements a Constrained Window as
24 // a child HWND with a custom window frame.
25 //
26 class ConstrainedWindowImpl : public ConstrainedWindow,
27 public views::WindowWin {
28 public:
29 virtual ~ConstrainedWindowImpl();
30
31 // Returns the TabContents that constrains this Constrained Window.
32 TabContents* owner() const { return owner_; }
33
34 // Overridden from views::Window:
35 virtual views::NonClientFrameView* CreateFrameViewForWindow();
36
37 // Overridden from ConstrainedWindow:
38 virtual void CloseConstrainedWindow();
39 virtual std::wstring GetWindowTitle() const;
40 virtual const gfx::Rect& GetCurrentBounds() const;
41
42 protected:
43 // Windows message handlers:
44 virtual void OnDestroy();
45 virtual void OnFinalMessage(HWND window);
46 virtual LRESULT OnMouseActivate(HWND window, UINT hittest_code, UINT message);
47 virtual void OnWindowPosChanged(WINDOWPOS* window_pos);
48
49 private:
50 friend class ConstrainedWindow;
51
52 // Use the static factory methods on ConstrainedWindow to construct a
53 // ConstrainedWindow.
54 ConstrainedWindowImpl(TabContents* owner,
55 views::WindowDelegate* window_delegate);
56
57 // Moves this window to the front of the Z-order and registers us with the
58 // focus manager.
59 void ActivateConstrainedWindow();
60
61 // The TabContents that owns and constrains this ConstrainedWindow.
62 TabContents* owner_;
63
64 // True if focus should not be restored to whatever view was focused last
65 // when this window is destroyed.
66 bool focus_restoration_disabled_;
67
68 // true if this window is really a constrained dialog. This is set by
69 // InitAsDialog().
70 bool is_dialog_;
71
72 // Current "anchor point", the lower right point at which we render
73 // the constrained title bar.
74 gfx::Point anchor_point_;
75
76 // Current display rectangle (relative to owner_'s visible area).
77 gfx::Rect current_bounds_;
78
79 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowImpl);
80 };
81
82 #endif // #ifndef CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698