| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <atlcomcli.h> | 7 #include <atlcomcli.h> |
| 8 // Necessary to define oleacc GUID's used in window_win.cc. | 8 // Necessary to define oleacc GUID's used in window_win.cc. |
| 9 #include <initguid.h> | 9 #include <initguid.h> |
| 10 #include <oleacc.h> | 10 #include <oleacc.h> |
| 11 | 11 |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "ui/base/dragdrop/drag_drop_types.h" | 13 #include "ui/base/dragdrop/drag_drop_types.h" |
| 14 #include "ui/gfx/canvas.h" | 14 #include "ui/gfx/canvas.h" |
| 15 #include "ui/gfx/path.h" | 15 #include "ui/gfx/path.h" |
| 16 #include "views/accessibility/native_view_accessibility_win.h" | 16 #include "views/accessibility/native_view_accessibility_win.h" |
| 17 #include "views/border.h" | 17 #include "views/border.h" |
| 18 #include "views/views_delegate.h" | 18 #include "views/views_delegate.h" |
| 19 #include "views/widget/root_view.h" | 19 #include "views/widget/root_view.h" |
| 20 #include "views/widget/widget.h" | 20 #include "views/widget/widget.h" |
| 21 #include "views/widget/widget_win.h" | 21 #include "views/widget/widget_win.h" |
| 22 | 22 |
| 23 namespace views { | 23 namespace views { |
| 24 | 24 |
| 25 NativeViewAccessibilityWin* View::GetNativeViewAccessibilityWin() { | 25 NativeViewAccessibilityWin* View::GetNativeViewAccessibilityWin() { |
| 26 if (!native_view_accessibility_win_.get()) | 26 if (!native_view_accessibility_win_.get()) |
| 27 native_view_accessibility_win_.swap( | 27 native_view_accessibility_win_ = |
| 28 NativeViewAccessibilityWin::Create(this)); | 28 NativeViewAccessibilityWin::Create(this); |
| 29 return native_view_accessibility_win_.get(); | 29 return native_view_accessibility_win_.get(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 int View::GetHorizontalDragThreshold() { | 32 int View::GetHorizontalDragThreshold() { |
| 33 static int threshold = -1; | 33 static int threshold = -1; |
| 34 if (threshold == -1) | 34 if (threshold == -1) |
| 35 threshold = GetSystemMetrics(SM_CXDRAG) / 2; | 35 threshold = GetSystemMetrics(SM_CXDRAG) / 2; |
| 36 return threshold; | 36 return threshold; |
| 37 } | 37 } |
| 38 | 38 |
| 39 int View::GetVerticalDragThreshold() { | 39 int View::GetVerticalDragThreshold() { |
| 40 static int threshold = -1; | 40 static int threshold = -1; |
| 41 if (threshold == -1) | 41 if (threshold == -1) |
| 42 threshold = GetSystemMetrics(SM_CYDRAG) / 2; | 42 threshold = GetSystemMetrics(SM_CYDRAG) / 2; |
| 43 return threshold; | 43 return threshold; |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace views | 46 } // namespace views |
| OLD | NEW |