diff options
Diffstat (limited to 'chrome')
6 files changed, 17 insertions, 15 deletions
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc index 54c35e5..7c32d290 100644 --- a/chrome/browser/aeropeek_manager.cc +++ b/chrome/browser/aeropeek_manager.cc @@ -35,8 +35,8 @@ #include "skia/ext/image_operations.h" #include "skia/ext/platform_canvas.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "ui/base/win/hwnd_util.h" #include "ui/base/win/window_impl.h" +#include "views/widget/widget_win.h" namespace { @@ -1016,7 +1016,7 @@ bool AeroPeekManager::Enabled() { // flooding users with tab thumbnails. const CommandLine* command_line = CommandLine::ForCurrentProcess(); return base::win::GetVersion() >= base::win::VERSION_WIN7 && - ui::ShouldUseVistaFrame() && + views::WidgetWin::IsAeroGlassEnabled() && !command_line->HasSwitch(switches::kApp) && command_line->HasSwitch(switches::kEnableAeroPeekTabs); } diff --git a/chrome/browser/themes/browser_theme_provider.cc b/chrome/browser/themes/browser_theme_provider.cc index 3ebbd37..87a73aa 100644 --- a/chrome/browser/themes/browser_theme_provider.cc +++ b/chrome/browser/themes/browser_theme_provider.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -20,7 +20,7 @@ #include "ui/base/resource/resource_bundle.h" #if defined(OS_WIN) -#include "ui/base/win/hwnd_util.h" +#include "views/widget/widget_win.h" #endif // Strings used in alignment properties. @@ -255,7 +255,7 @@ bool BrowserThemeProvider::ShouldUseNativeFrame() const { if (HasCustomImage(IDR_THEME_FRAME)) return false; #if defined(OS_WIN) - return ui::ShouldUseVistaFrame(); + return views::WidgetWin::IsAeroGlassEnabled(); #else return false; #endif diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc index a78656ee..8656360 100644 --- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc +++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc @@ -43,7 +43,7 @@ #include <objidl.h> #include "base/win/scoped_gdi_object.h" -#include "ui/base/win/hwnd_util.h" +#include "views/widget/widget_win.h" #endif #if defined(OS_LINUX) @@ -1104,7 +1104,7 @@ void AutocompletePopupContentsView::MakeContentsPath( void AutocompletePopupContentsView::UpdateBlurRegion() { #if defined(OS_WIN) // We only support background blurring on Vista with Aero-Glass enabled. - if (!ui::ShouldUseVistaFrame() || !GetWidget()) + if (!views::WidgetWin::IsAeroGlassEnabled() || !GetWidget()) return; // Provide a blurred background effect within the contents region of the diff --git a/chrome/browser/ui/views/constrained_window_win.cc b/chrome/browser/ui/views/constrained_window_win.cc index e669319..92dbcfa 100644 --- a/chrome/browser/ui/views/constrained_window_win.cc +++ b/chrome/browser/ui/views/constrained_window_win.cc @@ -26,9 +26,9 @@ #include "grit/theme_resources.h" #include "net/base/net_util.h" #include "ui/base/resource/resource_bundle.h" -#include "ui/base/win/hwnd_util.h" #include "views/controls/button/image_button.h" #include "views/focus/focus_manager.h" +#include "views/widget/widget_win.h" #include "views/window/client_view.h" #include "views/window/non_client_view.h" #include "views/window/window_resources.h" @@ -198,7 +198,8 @@ class ConstrainedWindowFrameView SkColor GetTitleColor() const { return (container_->owner()->profile()->IsOffTheRecord() || - !ui::ShouldUseVistaFrame()) ? SK_ColorWHITE : SK_ColorBLACK; + !views::WidgetWin::IsAeroGlassEnabled()) ? SK_ColorWHITE + : SK_ColorBLACK; } // Loads the appropriate set of WindowResources for the frame view. @@ -535,7 +536,7 @@ gfx::Rect ConstrainedWindowFrameView::CalculateClientAreaBounds( } void ConstrainedWindowFrameView::InitWindowResources() { - resources_.reset(ui::ShouldUseVistaFrame() ? + resources_.reset(views::WidgetWin::IsAeroGlassEnabled() ? static_cast<views::WindowResources*>(new VistaWindowResources) : new XPWindowResources); } diff --git a/chrome/browser/ui/views/first_run_bubble.cc b/chrome/browser/ui/views/first_run_bubble.cc index c34781c..4b01b9e 100644 --- a/chrome/browser/ui/views/first_run_bubble.cc +++ b/chrome/browser/ui/views/first_run_bubble.cc @@ -18,13 +18,13 @@ #include "ui/base/l10n/l10n_font_util.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" -#include "ui/base/win/hwnd_util.h" #include "views/controls/button/native_button.h" #include "views/controls/button/image_button.h" #include "views/controls/label.h" #include "views/event.h" #include "views/focus/focus_manager.h" #include "views/layout/layout_constants.h" +#include "views/widget/widget_win.h" #include "views/window/window.h" namespace { @@ -358,7 +358,7 @@ gfx::Size FirstRunOEMBubbleView::GetPreferredSize() { // now, we force Vista to show a correctly-sized box by taking account of // the difference in font size calculation. The coefficient should not be // stored in a variable because it's a hack and should go away. - if (ui::ShouldUseVistaFrame()) { + if (views::WidgetWin::IsAeroGlassEnabled()) { size.set_width(static_cast<int>(size.width() * 0.85)); size.set_height(static_cast<int>(size.height() * 0.85)); } diff --git a/chrome/browser/ui/views/frame/browser_frame_win.cc b/chrome/browser/ui/views/frame/browser_frame_win.cc index 50f9cc4..614d6da 100644 --- a/chrome/browser/ui/views/frame/browser_frame_win.cc +++ b/chrome/browser/ui/views/frame/browser_frame_win.cc @@ -20,8 +20,8 @@ #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" #include "gfx/font.h" #include "grit/theme_resources.h" -#include "ui/base/win/hwnd_util.h" #include "views/screen.h" +#include "views/widget/widget_win.h" #include "views/window/window_delegate.h" // static @@ -109,7 +109,8 @@ bool BrowserFrameWin::AlwaysUseNativeFrame() const { // We don't theme popup or app windows, so regardless of whether or not a // theme is active for normal browser windows, we don't want to use the custom // frame for popups/apps. - if (!browser_view_->IsBrowserTypeNormal() && ui::ShouldUseVistaFrame()) + if (!browser_view_->IsBrowserTypeNormal() && + views::WidgetWin::IsAeroGlassEnabled()) return true; // Otherwise, we use the native frame when we're told we should by the theme @@ -166,7 +167,7 @@ void BrowserFrameWin::OnEnterSizeMove() { } void BrowserFrameWin::OnExitSizeMove() { - WidgetWin::OnExitSizeMove(); + views::WidgetWin::OnExitSizeMove(); } void BrowserFrameWin::OnInitMenuPopup(HMENU menu, UINT position, |