| OLD | NEW |
| 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/view.h" | 5 #include "views/view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #ifndef NDEBUG | 8 #ifndef NDEBUG |
| 9 #include <iostream> | 9 #include <iostream> |
| 10 #endif | 10 #endif |
| (...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 } | 1153 } |
| 1154 | 1154 |
| 1155 void View::OnDragDone() { | 1155 void View::OnDragDone() { |
| 1156 } | 1156 } |
| 1157 | 1157 |
| 1158 bool View::InDrag() { | 1158 bool View::InDrag() { |
| 1159 RootView* root_view = GetRootView(); | 1159 RootView* root_view = GetRootView(); |
| 1160 return root_view ? (root_view->GetDragView() == this) : false; | 1160 return root_view ? (root_view->GetDragView() == this) : false; |
| 1161 } | 1161 } |
| 1162 | 1162 |
| 1163 bool View::GetAccessibleName(std::wstring* name) { | 1163 bool View::GetAccessibleName(string16* name) { |
| 1164 DCHECK(name); | 1164 DCHECK(name); |
| 1165 | 1165 |
| 1166 if (accessible_name_.empty()) | 1166 if (accessible_name_.empty()) |
| 1167 return false; | 1167 return false; |
| 1168 *name = UTF16ToWideHack(accessible_name_); | 1168 *name = accessible_name_; |
| 1169 return true; | 1169 return true; |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 AccessibilityTypes::Role View::GetAccessibleRole() { | 1172 AccessibilityTypes::Role View::GetAccessibleRole() { |
| 1173 return AccessibilityTypes::ROLE_CLIENT; | 1173 return AccessibilityTypes::ROLE_CLIENT; |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 void View::SetAccessibleName(const std::wstring& name) { | 1176 void View::SetAccessibleName(const string16& name) { |
| 1177 accessible_name_ = WideToUTF16Hack(name); | 1177 accessible_name_ = name; |
| 1178 } | 1178 } |
| 1179 | 1179 |
| 1180 // static | 1180 // static |
| 1181 void View::ConvertPointToView(const View* src, | 1181 void View::ConvertPointToView(const View* src, |
| 1182 const View* dst, | 1182 const View* dst, |
| 1183 gfx::Point* point) { | 1183 gfx::Point* point) { |
| 1184 ConvertPointToView(src, dst, point, true); | 1184 ConvertPointToView(src, dst, point, true); |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 // static | 1187 // static |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1531 possible_drag = false; | 1531 possible_drag = false; |
| 1532 start_pt = gfx::Point(); | 1532 start_pt = gfx::Point(); |
| 1533 } | 1533 } |
| 1534 | 1534 |
| 1535 void View::DragInfo::PossibleDrag(const gfx::Point& p) { | 1535 void View::DragInfo::PossibleDrag(const gfx::Point& p) { |
| 1536 possible_drag = true; | 1536 possible_drag = true; |
| 1537 start_pt = p; | 1537 start_pt = p; |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 } // namespace | 1540 } // namespace |
| OLD | NEW |