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

Side by Side Diff: third_party/WebKit/Source/core/input/MouseEventManager.cpp

Issue 2942273002: Avoid some static initializers in Windows builds (Closed)
Patch Set: Use constexpr [] instead of constexpr const * Created 3 years, 6 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "core/input/MouseEventManager.h" 5 #include "core/input/MouseEventManager.h"
6 6
7 #include "core/clipboard/DataObject.h" 7 #include "core/clipboard/DataObject.h"
8 #include "core/clipboard/DataTransfer.h" 8 #include "core/clipboard/DataTransfer.h"
9 #include "core/dom/Element.h" 9 #include "core/dom/Element.h"
10 #include "core/dom/ElementTraversal.h" 10 #include "core/dom/ElementTraversal.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 // The amount of time to wait before sending a fake mouse event triggered 57 // The amount of time to wait before sending a fake mouse event triggered
58 // during a scroll. 58 // during a scroll.
59 const double kFakeMouseMoveInterval = 0.1; 59 const double kFakeMouseMoveInterval = 0.1;
60 60
61 // TODO(crbug.com/653490): Read these values from the OS. 61 // TODO(crbug.com/653490): Read these values from the OS.
62 #if OS(MACOSX) 62 #if OS(MACOSX)
63 const int kDragThresholdX = 3; 63 const int kDragThresholdX = 3;
64 const int kDragThresholdY = 3; 64 const int kDragThresholdY = 3;
65 const TimeDelta kTextDragDelay = TimeDelta::FromSecondsD(0.15); 65 constexpr TimeDelta kTextDragDelay = TimeDelta::FromSecondsD(0.15);
66 #else 66 #else
67 const int kDragThresholdX = 4; 67 const int kDragThresholdX = 4;
68 const int kDragThresholdY = 4; 68 const int kDragThresholdY = 4;
69 const TimeDelta kTextDragDelay = TimeDelta::FromSecondsD(0.0); 69 constexpr TimeDelta kTextDragDelay = TimeDelta::FromSecondsD(0.0);
70 #endif 70 #endif
71 71
72 } // namespace 72 } // namespace
73 73
74 enum class DragInitiator { kMouse, kTouch }; 74 enum class DragInitiator { kMouse, kTouch };
75 75
76 MouseEventManager::MouseEventManager(LocalFrame& frame, 76 MouseEventManager::MouseEventManager(LocalFrame& frame,
77 ScrollManager& scroll_manager) 77 ScrollManager& scroll_manager)
78 : frame_(frame), 78 : frame_(frame),
79 scroll_manager_(scroll_manager), 79 scroll_manager_(scroll_manager),
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 1087
1088 void MouseEventManager::SetClickCount(int click_count) { 1088 void MouseEventManager::SetClickCount(int click_count) {
1089 click_count_ = click_count; 1089 click_count_ = click_count;
1090 } 1090 }
1091 1091
1092 bool MouseEventManager::MouseDownMayStartDrag() { 1092 bool MouseEventManager::MouseDownMayStartDrag() {
1093 return mouse_down_may_start_drag_; 1093 return mouse_down_may_start_drag_;
1094 } 1094 }
1095 1095
1096 } // namespace blink 1096 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/page/AutoscrollController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698