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

Side by Side Diff: views/controls/textfield/native_textfield_win.cc

Issue 3823002: Move windows version-related stuff out of base/win_util and into base/win/win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "views/controls/textfield/native_textfield_win.h" 5 #include "views/controls/textfield/native_textfield_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/clipboard/clipboard.h" 9 #include "app/clipboard/clipboard.h"
10 #include "app/clipboard/scoped_clipboard_writer.h" 10 #include "app/clipboard/scoped_clipboard_writer.h"
11 #include "app/keyboard_codes.h" 11 #include "app/keyboard_codes.h"
12 #include "app/l10n_util.h" 12 #include "app/l10n_util.h"
13 #include "app/l10n_util_win.h" 13 #include "app/l10n_util_win.h"
14 #include "app/win_util.h" 14 #include "app/win_util.h"
15 #include "base/i18n/rtl.h" 15 #include "base/i18n/rtl.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/utf_string_conversions.h" 17 #include "base/utf_string_conversions.h"
18 #include "base/win_util.h" 18 #include "base/win/windows_version.h"
19 #include "gfx/native_theme_win.h" 19 #include "gfx/native_theme_win.h"
20 #include "grit/app_strings.h" 20 #include "grit/app_strings.h"
21 #include "skia/ext/skia_utils_win.h" 21 #include "skia/ext/skia_utils_win.h"
22 #include "views/controls/label.h" 22 #include "views/controls/label.h"
23 #include "views/controls/menu/menu_win.h" 23 #include "views/controls/menu/menu_win.h"
24 #include "views/controls/menu/menu_2.h" 24 #include "views/controls/menu/menu_2.h"
25 #include "views/controls/native/native_view_host.h" 25 #include "views/controls/native/native_view_host.h"
26 #include "views/controls/textfield/textfield.h" 26 #include "views/controls/textfield/textfield.h"
27 #include "views/focus/focus_manager.h" 27 #include "views/focus/focus_manager.h"
28 #include "views/focus/focus_util_win.h" 28 #include "views/focus/focus_util_win.h"
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 window_rect.right - content_insets_.right(), 754 window_rect.right - content_insets_.right(),
755 window_rect.bottom - content_insets_.bottom()); 755 window_rect.bottom - content_insets_.bottom());
756 756
757 HBRUSH brush = CreateSolidBrush(bg_color_); 757 HBRUSH brush = CreateSolidBrush(bg_color_);
758 FillRect(hdc, &window_rect, brush); 758 FillRect(hdc, &window_rect, brush);
759 DeleteObject(brush); 759 DeleteObject(brush);
760 760
761 int part; 761 int part;
762 int state; 762 int state;
763 763
764 if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) { 764 if (base::win::GetVersion() < base::win::VERSION_VISTA) {
765 part = EP_EDITTEXT; 765 part = EP_EDITTEXT;
766 766
767 if (!textfield_->IsEnabled()) 767 if (!textfield_->IsEnabled())
768 state = ETS_DISABLED; 768 state = ETS_DISABLED;
769 else if (textfield_->read_only()) 769 else if (textfield_->read_only())
770 state = ETS_READONLY; 770 state = ETS_READONLY;
771 else if (!contains_mouse_) 771 else if (!contains_mouse_)
772 state = ETS_NORMAL; 772 state = ETS_NORMAL;
773 else 773 else
774 state = ETS_HOT; 774 state = ETS_HOT;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 //////////////////////////////////////////////////////////////////////////////// 1057 ////////////////////////////////////////////////////////////////////////////////
1058 // NativeTextfieldWrapper, public: 1058 // NativeTextfieldWrapper, public:
1059 1059
1060 // static 1060 // static
1061 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( 1061 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper(
1062 Textfield* field) { 1062 Textfield* field) {
1063 return new NativeTextfieldWin(field); 1063 return new NativeTextfieldWin(field);
1064 } 1064 }
1065 1065
1066 } // namespace views 1066 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698