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

Side by Side Diff: chrome/browser/views/constrained_window_win.h

Issue 146093: Relanding focus manager refactoring (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_VIEWS_CONSTRAINED_WINDOW_WIN_H_ 5 #ifndef CHROME_BROWSER_VIEWS_CONSTRAINED_WINDOW_WIN_H_
6 #define CHROME_BROWSER_VIEWS_CONSTRAINED_WINDOW_WIN_H_ 6 #define CHROME_BROWSER_VIEWS_CONSTRAINED_WINDOW_WIN_H_
7 7
8 #include "base/gfx/rect.h" 8 #include "base/gfx/rect.h"
9 #include "chrome/browser/tab_contents/constrained_window.h" 9 #include "chrome/browser/tab_contents/constrained_window.h"
10 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 10 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
11 #include "views/window/window_win.h" 11 #include "views/window/window_win.h"
12 12
13 class ConstrainedTabContentsWindowDelegate; 13 class ConstrainedTabContentsWindowDelegate;
14 class ConstrainedWindowAnimation; 14 class ConstrainedWindowAnimation;
15 class ConstrainedWindowFrameView; 15 class ConstrainedWindowFrameView;
16 namespace views { 16 namespace views {
17 class WindowDelegate; 17 class WindowDelegate;
18 } 18 }
19 19
20 /////////////////////////////////////////////////////////////////////////////// 20 ///////////////////////////////////////////////////////////////////////////////
21 // ConstrainedWindowWin 21 // ConstrainedWindowWin
22 // 22 //
23 // A ConstrainedWindow implementation that implements a Constrained Window as 23 // A ConstrainedWindow implementation that implements a Constrained Window as
24 // a child HWND with a custom window frame. 24 // a child HWND with a custom window frame.
25 // 25 //
26 class ConstrainedWindowWin : public ConstrainedWindow, 26 class ConstrainedWindowWin : public ConstrainedWindow,
27 public views::WindowWin { 27 public views::WindowWin {
28 public: 28 public:
29 virtual ~ConstrainedWindowWin(); 29 virtual ~ConstrainedWindowWin();
30 30
31 // Returns the TabContents that constrains this Constrained Window. 31 // Returns the TabContents that constrains this Constrained Window.
32 TabContents* owner() const { return owner_; } 32 TabContents* owner() const { return owner_; }
33 33
34 // Overridden from views::Window: 34 // Overridden from views::Window:
35 virtual views::NonClientFrameView* CreateFrameViewForWindow(); 35 virtual views::NonClientFrameView* CreateFrameViewForWindow();
36 36
37 // Overridden from ConstrainedWindow: 37 // Overridden from ConstrainedWindow:
(...skipping 16 matching lines...) Expand all
54 ConstrainedWindowWin(TabContents* owner, 54 ConstrainedWindowWin(TabContents* owner,
55 views::WindowDelegate* window_delegate); 55 views::WindowDelegate* window_delegate);
56 56
57 // Moves this window to the front of the Z-order and registers us with the 57 // Moves this window to the front of the Z-order and registers us with the
58 // focus manager. 58 // focus manager.
59 void ActivateConstrainedWindow(); 59 void ActivateConstrainedWindow();
60 60
61 // The TabContents that owns and constrains this ConstrainedWindow. 61 // The TabContents that owns and constrains this ConstrainedWindow.
62 TabContents* owner_; 62 TabContents* owner_;
63 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 // Current "anchor point", the lower right point at which we render 64 // Current "anchor point", the lower right point at which we render
69 // the constrained title bar. 65 // the constrained title bar.
70 gfx::Point anchor_point_; 66 gfx::Point anchor_point_;
71 67
72 // Current display rectangle (relative to owner_'s visible area). 68 // Current display rectangle (relative to owner_'s visible area).
73 gfx::Rect current_bounds_; 69 gfx::Rect current_bounds_;
74 70
75 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowWin); 71 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowWin);
76 }; 72 };
77 73
78 #endif // #ifndef CHROME_BROWSER_VIEWS_CONSTRAINED_WINDOW_WIN_H_ 74 #endif // #ifndef CHROME_BROWSER_VIEWS_CONSTRAINED_WINDOW_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698