summaryrefslogtreecommitdiffstats
path: root/ui/views/view_win.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 23:35:20 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 23:35:20 +0000
commit5025f86107dafec51f98c62dbdc996fbb703a361 (patch)
treea871aad5635c650c243b44b59d1802f79f590458 /ui/views/view_win.cc
parent5c9a1adb03e4e0059e25366a908f30dd28786790 (diff)
downloadchromium_src-5025f86107dafec51f98c62dbdc996fbb703a361.zip
chromium_src-5025f86107dafec51f98c62dbdc996fbb703a361.tar.gz
chromium_src-5025f86107dafec51f98c62dbdc996fbb703a361.tar.bz2
views: Move view.h to ui/views/.
BUG=104039 R=ben@chromium.org TBR=stevenjb@chromium.org Review URL: http://codereview.chromium.org/8742030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112333 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/view_win.cc')
-rw-r--r--ui/views/view_win.cc36
1 files changed, 36 insertions, 0 deletions
diff --git a/ui/views/view_win.cc b/ui/views/view_win.cc
new file mode 100644
index 0000000..472fbcd
--- /dev/null
+++ b/ui/views/view_win.cc
@@ -0,0 +1,36 @@
+// Copyright (c) 2011 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 "ui/views/view.h"
+
+// Necessary to define oleacc GUID's.
+#include <windows.h>
+#include <initguid.h>
+#include <oleacc.h>
+
+#include "ui/views/accessibility/native_view_accessibility_win.h"
+
+namespace views {
+
+gfx::NativeViewAccessible View::GetNativeViewAccessible() {
+ if (!native_view_accessibility_win_.get())
+ native_view_accessibility_win_ = NativeViewAccessibilityWin::Create(this);
+ return native_view_accessibility_win_.get();
+}
+
+int View::GetHorizontalDragThreshold() {
+ static int threshold = -1;
+ if (threshold == -1)
+ threshold = GetSystemMetrics(SM_CXDRAG) / 2;
+ return threshold;
+}
+
+int View::GetVerticalDragThreshold() {
+ static int threshold = -1;
+ if (threshold == -1)
+ threshold = GetSystemMetrics(SM_CYDRAG) / 2;
+ return threshold;
+}
+
+} // namespace views