diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 01:59:15 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 01:59:15 +0000 |
commit | 935aa54d9a5e2e617c61c9f8dcea398768413443 (patch) | |
tree | 3df9ec9316cd4d5b7171e5c6c869a01d823cc507 /views | |
parent | 7d1f3348c26eda2d1656860c821d335bf94d4cda (diff) | |
download | chromium_src-935aa54d9a5e2e617c61c9f8dcea398768413443.zip chromium_src-935aa54d9a5e2e617c61c9f8dcea398768413443.tar.gz chromium_src-935aa54d9a5e2e617c61c9f8dcea398768413443.tar.bz2 |
Move windows version-related stuff out of base/win_util and into base/win/windows_version. Many files now only need to include this instead of all of win_util.
Remove a bunch of unused code from base/win_util. There was a surprising amount.
Replace the AppUserModel property key with the one from the SDK now that we use the Win7 SDK. Move GetLogonSessionOnlyDACL from win_util to ipc since it's only used in that one place.
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/3823002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/button/native_button_win.cc | 3 | ||||
-rw-r--r-- | views/controls/menu/menu_host_win.cc | 6 | ||||
-rw-r--r-- | views/controls/textfield/native_textfield_win.cc | 4 | ||||
-rw-r--r-- | views/window/window_win.cc | 3 |
4 files changed, 9 insertions, 7 deletions
diff --git a/views/controls/button/native_button_win.cc b/views/controls/button/native_button_win.cc index 45301f0..5aac782 100644 --- a/views/controls/button/native_button_win.cc +++ b/views/controls/button/native_button_win.cc @@ -10,6 +10,7 @@ #include "base/logging.h" #include "base/scoped_comptr_win.h" #include "base/win_util.h" +#include "base/win/windows_version.h" #include "views/controls/button/checkbox.h" #include "views/controls/button/native_button.h" #include "views/controls/button/radio_button.h" @@ -39,7 +40,7 @@ void NativeButtonWin::UpdateLabel() { // Show or hide the shield icon of Windows onto this button every time when we // update the button text so Windows can lay out the shield icon and the // button text correctly. - if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA && + if (base::win::GetVersion() >= base::win::VERSION_VISTA && win_util::UserAccountControlIsEnabled()) { Button_SetElevationRequiredState(native_view(), native_button_->need_elevation()); diff --git a/views/controls/menu/menu_host_win.cc b/views/controls/menu/menu_host_win.cc index 384229f..1bcc295 100644 --- a/views/controls/menu/menu_host_win.cc +++ b/views/controls/menu/menu_host_win.cc @@ -1,10 +1,10 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. #include "views/controls/menu/menu_host_win.h" -#include "base/win_util.h" +#include "base/win/windows_version.h" #include "views/controls/menu/menu_controller.h" #include "views/controls/menu/menu_host_root_view.h" #include "views/controls/menu/menu_item_view.h" @@ -23,7 +23,7 @@ MenuHostWin::MenuHostWin(SubmenuView* submenu) owns_capture_(false) { set_window_style(WS_POPUP); set_initial_class_style( - (win_util::GetWinVersion() < win_util::WINVERSION_XP) ? + (base::win::GetVersion() < base::win::VERSION_XP) ? 0 : CS_DROPSHADOW); is_mouse_down_ = ((GetKeyState(VK_LBUTTON) & 0x80) || diff --git a/views/controls/textfield/native_textfield_win.cc b/views/controls/textfield/native_textfield_win.cc index c91dcdf..254c677 100644 --- a/views/controls/textfield/native_textfield_win.cc +++ b/views/controls/textfield/native_textfield_win.cc @@ -15,7 +15,7 @@ #include "base/i18n/rtl.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "base/win_util.h" +#include "base/win/windows_version.h" #include "gfx/native_theme_win.h" #include "grit/app_strings.h" #include "skia/ext/skia_utils_win.h" @@ -761,7 +761,7 @@ void NativeTextfieldWin::OnNCPaint(HRGN region) { int part; int state; - if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) { + if (base::win::GetVersion() < base::win::VERSION_VISTA) { part = EP_EDITTEXT; if (!textfield_->IsEnabled()) diff --git a/views/window/window_win.cc b/views/window/window_win.cc index 0443478..b9b1c61 100644 --- a/views/window/window_win.cc +++ b/views/window/window_win.cc @@ -12,6 +12,7 @@ #include "app/win_util.h" #include "base/i18n/rtl.h" #include "base/win_util.h" +#include "base/win/windows_version.h" #include "gfx/canvas_skia_paint.h" #include "gfx/font.h" #include "gfx/icon_util.h" @@ -193,7 +194,7 @@ static BOOL CALLBACK SendDwmCompositionChanged(HWND window, LPARAM param) { } // namespace void WindowWin::FrameTypeChanged() { - if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { + if (base::win::GetVersion() >= base::win::VERSION_VISTA) { // We need to toggle the rendering policy of the DWM/glass frame as we // change from opaque to glass. "Non client rendering enabled" means that // the DWM's glass non-client rendering is enabled, which is why |