summaryrefslogtreecommitdiffstats
path: root/views/window
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-07 20:52:39 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-07 20:52:39 +0000
commitbaa2fa68889610ed927f443323b6b6e64b78bff2 (patch)
tree313122670312e981ca5d235dfd386a76c0b01949 /views/window
parent69747cd586c65d34da6e31d1f6da787db864cbe6 (diff)
downloadchromium_src-baa2fa68889610ed927f443323b6b6e64b78bff2.zip
chromium_src-baa2fa68889610ed927f443323b6b6e64b78bff2.tar.gz
chromium_src-baa2fa68889610ed927f443323b6b6e64b78bff2.tar.bz2
Ensure that popups windows are not themed.
BUG= http://crbug.com/18093 TEST= While running Chrome with a theme installed, and force a popup. Note that the popup window is not themed. Review URL: http://codereview.chromium.org/159871 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r--views/window/non_client_view.cc9
-rw-r--r--views/window/non_client_view.h8
2 files changed, 16 insertions, 1 deletions
diff --git a/views/window/non_client_view.cc b/views/window/non_client_view.cc
index 2ec823b..a97531f 100644
--- a/views/window/non_client_view.cc
+++ b/views/window/non_client_view.cc
@@ -32,7 +32,8 @@ static const int kClientViewIndex = 1;
NonClientView::NonClientView(Window* frame)
: frame_(frame),
- client_view_(NULL) {
+ client_view_(NULL),
+ force_aero_glass_frame_(false) {
}
NonClientView::~NonClientView() {
@@ -68,6 +69,8 @@ void NonClientView::UpdateFrame() {
}
bool NonClientView::UseNativeFrame() const {
+ if (force_aero_glass_frame_)
+ return true;
// The frame view may always require a custom frame, e.g. Constrained Windows.
if (frame_view_.get() && frame_view_->AlwaysUseCustomFrame())
return false;
@@ -201,6 +204,10 @@ void NonClientView::SetAccessibleName(const std::wstring& name) {
accessible_name_ = name;
}
+void NonClientView::ForceAeroGlassFrame() {
+ force_aero_glass_frame_ = true;
+}
+
////////////////////////////////////////////////////////////////////////////////
// NonClientFrameView, View overrides:
diff --git a/views/window/non_client_view.h b/views/window/non_client_view.h
index 797ff77..c4ae4b0 100644
--- a/views/window/non_client_view.h
+++ b/views/window/non_client_view.h
@@ -198,6 +198,10 @@ class NonClientView : public View {
virtual bool GetAccessibleName(std::wstring* name);
virtual void SetAccessibleName(const std::wstring& name);
+ // Call if the nonclientview is in an app or popup and we are in Vista, to
+ // force usage of glass frame.
+ void ForceAeroGlassFrame();
+
protected:
// NonClientView, View overrides:
virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
@@ -220,6 +224,10 @@ class NonClientView : public View {
// The accessible name of this view.
std::wstring accessible_name_;
+ // True if the nonclientview is in an app or popup and we are in Vista. Used
+ // to force usage of glass frame.
+ bool force_aero_glass_frame_;
+
DISALLOW_COPY_AND_ASSIGN(NonClientView);
};