diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 00:28:00 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 00:28:00 +0000 |
commit | 32670b07a6c42634f446e3d471f42a9fb40090f2 (patch) | |
tree | 77b15435f3a436d54fcaa5cb4c0d4371a007fad6 /chrome/browser/views/constrained_window_impl.h | |
parent | a0e5688cc11f7f5e835b5c1a75c17ce4a28a1527 (diff) | |
download | chromium_src-32670b07a6c42634f446e3d471f42a9fb40090f2.zip chromium_src-32670b07a6c42634f446e3d471f42a9fb40090f2.tar.gz chromium_src-32670b07a6c42634f446e3d471f42a9fb40090f2.tar.bz2 |
Support DWM switching.
This completes the collapsing of window types and browser frames around a single class: views::Window. CustomFrameWindow is removed with this change.
The Browser window is represented by a single views::Window subclass: BrowserFrame, which replaces both AeroGlassFrame and OpaqueFrame.
NonClientView is now a container of two sibling classes - the Window's ClientView (in the Browser's case, BrowserView), and a NonClientFrameView subclass, which provides the rendering for the non-client portions of the window. These Views are siblings rather than the ClientView a child of the NonClientFrameView because when the DWM is toggled, the ClientView would have to be re-parented. Many Views make the assumption they are only inserted into a View hierarchy once, and so this is problematic. By having the views be siblings, this is avoided.
With this in mind, all of the former NonClientViews now become NonClientFrameView subclasses:
DefaultNonClientView -> CustomFrameView
(non-existent, NonClientView) -> NativeFrameView
AeroGlassNonClientView -> GlassBrowserFrameView
OpaqueNonClientView -> OpaqueBrowserFrameView
The latter two derive from NonClientFrameView via BrowserNonClientFrameView, which adds some extras.
I also had to modify the TabRenderer class to know how to drop its cache of tab background images when the theme changes since it uses different ones for Glass and non-Glass.
This change also fixes a few non-client flicker issues relating to window non-client activation by using more ScopedRedrawLocks. (Touches info_bubble.cc, window.cc)
Bugs fixed:
http://crbug.com/153
http://crbug.com/747
http://crbug.com/2371
http://crbug.com/3264
http://crbug.com/8234
Plumbing for http://crbug.com/8247
Design docs:
http://dev.chromium.org/developers/design-documents/views-windowing
http://dev.chromium.org/developers/design-documents/browser-window
Review URL: http://codereview.chromium.org/27317
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/constrained_window_impl.h')
-rw-r--r-- | chrome/browser/views/constrained_window_impl.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/chrome/browser/views/constrained_window_impl.h b/chrome/browser/views/constrained_window_impl.h index 229555e..30e6303 100644 --- a/chrome/browser/views/constrained_window_impl.h +++ b/chrome/browser/views/constrained_window_impl.h @@ -8,11 +8,11 @@ #include "base/gfx/rect.h" #include "chrome/browser/tab_contents/constrained_window.h" #include "chrome/browser/tab_contents/tab_contents_delegate.h" -#include "chrome/views/custom_frame_window.h" +#include "chrome/views/window.h" class ConstrainedTabContentsWindowDelegate; class ConstrainedWindowAnimation; -class ConstrainedWindowNonClientView; +class ConstrainedWindowFrameView; namespace views { class HWNDView; class WindowDelegate; @@ -25,20 +25,15 @@ class WindowDelegate; // a child HWND with a custom window frame. // class ConstrainedWindowImpl : public ConstrainedWindow, - public views::CustomFrameWindow { + public views::Window { public: virtual ~ConstrainedWindowImpl(); // Returns the TabContents that constrains this Constrained Window. TabContents* owner() const { return owner_; } - // Returns the non-client view inside this Constrained Window. - // NOTE: Defining the function body here would require pulling in the - // declarations of ConstrainedWindowNonClientView, as well as all the classes - // it depends on, from the .cc file; the benefit isn't worth it. - ConstrainedWindowNonClientView* non_client_view(); - - // Overridden from views::CustomFrameWindow: + // Overridden from views::Window: + virtual views::NonClientFrameView* CreateFrameViewForWindow(); virtual void UpdateWindowTitle(); // Overridden from ConstrainedWindow: @@ -64,7 +59,7 @@ class ConstrainedWindowImpl : public ConstrainedWindow, // ConstrainedWindow. ConstrainedWindowImpl(TabContents* owner, views::WindowDelegate* window_delegate); - void Init(TabContents* owner); + void Init(); // Initialize the Constrained Window as a Constrained Dialog containing a // views::View client area. |