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

Side by Side Diff: Source/core/page/DragController.cpp

Issue 48523009: Fix unused functions warnings on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix DragController Created 7 years, 1 month 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
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/platform/graphics/AlternateFontFamily.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Google Inc. 3 * Copyright (C) 2008 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 namespace WebCore { 86 namespace WebCore {
87 87
88 const int DragController::DragIconRightInset = 7; 88 const int DragController::DragIconRightInset = 7;
89 const int DragController::DragIconBottomInset = 3; 89 const int DragController::DragIconBottomInset = 3;
90 90
91 static const int MaxOriginalImageArea = 1500 * 1500; 91 static const int MaxOriginalImageArea = 1500 * 1500;
92 static const int LinkDragBorderInset = 2; 92 static const int LinkDragBorderInset = 2;
93 static const float DragImageAlpha = 0.75f; 93 static const float DragImageAlpha = 0.75f;
94 94
95 #if !ASSERT_DISABLED
95 static bool dragTypeIsValid(DragSourceAction action) 96 static bool dragTypeIsValid(DragSourceAction action)
96 { 97 {
97 switch (action) { 98 switch (action) {
98 case DragSourceActionDHTML: 99 case DragSourceActionDHTML:
99 case DragSourceActionImage: 100 case DragSourceActionImage:
100 case DragSourceActionLink: 101 case DragSourceActionLink:
101 case DragSourceActionSelection: 102 case DragSourceActionSelection:
102 return true; 103 return true;
103 case DragSourceActionNone: 104 case DragSourceActionNone:
104 return false; 105 return false;
105 } 106 }
106 // Make sure MSVC doesn't complain that not all control paths return a value . 107 // Make sure MSVC doesn't complain that not all control paths return a value .
107 return false; 108 return false;
108 } 109 }
110 #endif
109 111
110 static PlatformMouseEvent createMouseEvent(DragData* dragData) 112 static PlatformMouseEvent createMouseEvent(DragData* dragData)
111 { 113 {
112 bool shiftKey, ctrlKey, altKey, metaKey; 114 bool shiftKey, ctrlKey, altKey, metaKey;
113 shiftKey = ctrlKey = altKey = metaKey = false; 115 shiftKey = ctrlKey = altKey = metaKey = false;
114 int keyState = dragData->modifierKeyState(); 116 int keyState = dragData->modifierKeyState();
115 shiftKey = static_cast<bool>(keyState & PlatformEvent::ShiftKey); 117 shiftKey = static_cast<bool>(keyState & PlatformEvent::ShiftKey);
116 ctrlKey = static_cast<bool>(keyState & PlatformEvent::CtrlKey); 118 ctrlKey = static_cast<bool>(keyState & PlatformEvent::CtrlKey);
117 altKey = static_cast<bool>(keyState & PlatformEvent::AltKey); 119 altKey = static_cast<bool>(keyState & PlatformEvent::AltKey);
118 metaKey = static_cast<bool>(keyState & PlatformEvent::MetaKey); 120 metaKey = static_cast<bool>(keyState & PlatformEvent::MetaKey);
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 return false; 928 return false;
927 #endif 929 #endif
928 } 930 }
929 931
930 void DragController::cleanupAfterSystemDrag() 932 void DragController::cleanupAfterSystemDrag()
931 { 933 {
932 } 934 }
933 935
934 } // namespace WebCore 936 } // namespace WebCore
935 937
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/platform/graphics/AlternateFontFamily.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698