| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/views/controls/textfield/native_textfield_win.h" | 5 #include "ui/views/controls/textfield/native_textfield_win.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 SetEditStyle(SES_LOWERCASE, SES_LOWERCASE); | 117 SetEditStyle(SES_LOWERCASE, SES_LOWERCASE); |
| 118 } | 118 } |
| 119 | 119 |
| 120 // Set up the text_object_model_. | 120 // Set up the text_object_model_. |
| 121 base::win::ScopedComPtr<IRichEditOle, &IID_IRichEditOle> ole_interface; | 121 base::win::ScopedComPtr<IRichEditOle, &IID_IRichEditOle> ole_interface; |
| 122 ole_interface.Attach(GetOleInterface()); | 122 ole_interface.Attach(GetOleInterface()); |
| 123 if (ole_interface) | 123 if (ole_interface) |
| 124 text_object_model_.QueryFrom(ole_interface); | 124 text_object_model_.QueryFrom(ole_interface); |
| 125 | 125 |
| 126 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && | 126 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && |
| 127 !base::win::GetMetroModule()) { | 127 !base::win::IsMetroProcess()) { |
| 128 keyboard_.CreateInstance(__uuidof(TextInputPanel), NULL, CLSCTX_INPROC); | 128 keyboard_.CreateInstance(__uuidof(TextInputPanel), NULL, CLSCTX_INPROC); |
| 129 if (keyboard_ != NULL) | 129 if (keyboard_ != NULL) |
| 130 keyboard_->put_AttachedEditWindow(m_hWnd); | 130 keyboard_->put_AttachedEditWindow(m_hWnd); |
| 131 } | 131 } |
| 132 | 132 |
| 133 InitializeAccessibilityInfo(); | 133 InitializeAccessibilityInfo(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 NativeTextfieldWin::~NativeTextfieldWin() { | 136 NativeTextfieldWin::~NativeTextfieldWin() { |
| 137 if (IsWindow()) | 137 if (IsWindow()) |
| (...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 context_menu_contents_->AddSeparator(); | 1198 context_menu_contents_->AddSeparator(); |
| 1199 context_menu_contents_->AddItemWithStringId(IDS_APP_CUT, IDS_APP_CUT); | 1199 context_menu_contents_->AddItemWithStringId(IDS_APP_CUT, IDS_APP_CUT); |
| 1200 context_menu_contents_->AddItemWithStringId(IDS_APP_COPY, IDS_APP_COPY); | 1200 context_menu_contents_->AddItemWithStringId(IDS_APP_COPY, IDS_APP_COPY); |
| 1201 context_menu_contents_->AddItemWithStringId(IDS_APP_PASTE, IDS_APP_PASTE); | 1201 context_menu_contents_->AddItemWithStringId(IDS_APP_PASTE, IDS_APP_PASTE); |
| 1202 context_menu_contents_->AddSeparator(); | 1202 context_menu_contents_->AddSeparator(); |
| 1203 context_menu_contents_->AddItemWithStringId(IDS_APP_SELECT_ALL, | 1203 context_menu_contents_->AddItemWithStringId(IDS_APP_SELECT_ALL, |
| 1204 IDS_APP_SELECT_ALL); | 1204 IDS_APP_SELECT_ALL); |
| 1205 } | 1205 } |
| 1206 | 1206 |
| 1207 } // namespace views | 1207 } // namespace views |
| OLD | NEW |