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

Side by Side Diff: content/browser/devtools/renderer_overrides_handler.cc

Issue 304793003: use enum to specify deviceSource for fling animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed desired #include Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/devtools/renderer_overrides_handler.h" 5 #include "content/browser/devtools/renderer_overrides_handler.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/barrier_closure.h" 10 #include "base/barrier_closure.h"
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 RendererOverridesHandler::InputDispatchGestureEvent( 926 RendererOverridesHandler::InputDispatchGestureEvent(
927 scoped_refptr<DevToolsProtocol::Command> command) { 927 scoped_refptr<DevToolsProtocol::Command> command) {
928 base::DictionaryValue* params = command->params(); 928 base::DictionaryValue* params = command->params();
929 if (!params) 929 if (!params)
930 return NULL; 930 return NULL;
931 931
932 RenderViewHostImpl* host = static_cast<RenderViewHostImpl*>( 932 RenderViewHostImpl* host = static_cast<RenderViewHostImpl*>(
933 agent_->GetRenderViewHost()); 933 agent_->GetRenderViewHost());
934 blink::WebGestureEvent event; 934 blink::WebGestureEvent event;
935 ParseGenericInputParams(params, &event); 935 ParseGenericInputParams(params, &event);
936 event.sourceDevice = WebGestureEvent::Touchscreen; 936 event.sourceDevice = blink::WebGestureDeviceTouchpad;
937 937
938 std::string type; 938 std::string type;
939 if (params->GetString(devtools::Input::dispatchGestureEvent::kParamType, 939 if (params->GetString(devtools::Input::dispatchGestureEvent::kParamType,
940 &type)) { 940 &type)) {
941 if (type == 941 if (type ==
942 devtools::Input::dispatchGestureEvent::Type::kEnumScrollBegin) 942 devtools::Input::dispatchGestureEvent::Type::kEnumScrollBegin)
943 event.type = WebInputEvent::GestureScrollBegin; 943 event.type = WebInputEvent::GestureScrollBegin;
944 else if (type == 944 else if (type ==
945 devtools::Input::dispatchGestureEvent::Type::kEnumScrollUpdate) 945 devtools::Input::dispatchGestureEvent::Type::kEnumScrollUpdate)
946 event.type = WebInputEvent::GestureScrollUpdate; 946 event.type = WebInputEvent::GestureScrollUpdate;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 return NULL; 998 return NULL;
999 } 999 }
1000 event.data.pinchUpdate.scale = static_cast<float>(scale); 1000 event.data.pinchUpdate.scale = static_cast<float>(scale);
1001 } 1001 }
1002 1002
1003 host->ForwardGestureEvent(event); 1003 host->ForwardGestureEvent(event);
1004 return command->SuccessResponse(NULL); 1004 return command->SuccessResponse(NULL);
1005 } 1005 }
1006 1006
1007 } // namespace content 1007 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_widget_host_view_guest.cc » ('j') | content/child/blink_platform_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698