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

Side by Side Diff: content/shell/test_runner/test_plugin.cc

Issue 2844823002: Support Coalesced Touch in ppapi (Closed)
Patch Set: Support Coalesced Touch in ppapi Created 3 years, 7 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
« no previous file with comments | « content/shell/test_runner/test_plugin.h ('k') | ppapi/api/ppb_input_event.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/shell/test_runner/test_plugin.h" 5 #include "content/shell/test_runner/test_plugin.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "base/memory/shared_memory.h" 15 #include "base/memory/shared_memory.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "cc/blink/web_layer_impl.h" 17 #include "cc/blink/web_layer_impl.h"
18 #include "cc/layers/texture_layer.h" 18 #include "cc/layers/texture_layer.h"
19 #include "cc/resources/shared_bitmap_manager.h" 19 #include "cc/resources/shared_bitmap_manager.h"
20 #include "content/shell/test_runner/web_test_delegate.h" 20 #include "content/shell/test_runner/web_test_delegate.h"
21 #include "gpu/command_buffer/client/gles2_interface.h" 21 #include "gpu/command_buffer/client/gles2_interface.h"
22 #include "third_party/WebKit/public/platform/Platform.h" 22 #include "third_party/WebKit/public/platform/Platform.h"
23 #include "third_party/WebKit/public/platform/WebCoalescedInputEvent.h"
23 #include "third_party/WebKit/public/platform/WebCompositorSupport.h" 24 #include "third_party/WebKit/public/platform/WebCompositorSupport.h"
24 #include "third_party/WebKit/public/platform/WebGestureEvent.h" 25 #include "third_party/WebKit/public/platform/WebGestureEvent.h"
25 #include "third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h" 26 #include "third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h"
26 #include "third_party/WebKit/public/platform/WebInputEvent.h" 27 #include "third_party/WebKit/public/platform/WebInputEvent.h"
27 #include "third_party/WebKit/public/platform/WebMouseEvent.h" 28 #include "third_party/WebKit/public/platform/WebMouseEvent.h"
28 #include "third_party/WebKit/public/platform/WebThread.h" 29 #include "third_party/WebKit/public/platform/WebThread.h"
29 #include "third_party/WebKit/public/platform/WebTouchEvent.h" 30 #include "third_party/WebKit/public/platform/WebTouchEvent.h"
30 #include "third_party/WebKit/public/platform/WebTouchPoint.h" 31 #include "third_party/WebKit/public/platform/WebTouchPoint.h"
31 #include "third_party/WebKit/public/platform/WebTraceLocation.h" 32 #include "third_party/WebKit/public/platform/WebTraceLocation.h"
32 #include "third_party/WebKit/public/platform/WebURL.h" 33 #include "third_party/WebKit/public/platform/WebURL.h"
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 } 528 }
528 if (vertex_shader) 529 if (vertex_shader)
529 gl_->DeleteShader(vertex_shader); 530 gl_->DeleteShader(vertex_shader);
530 if (fragment_shader) 531 if (fragment_shader)
531 gl_->DeleteShader(fragment_shader); 532 gl_->DeleteShader(fragment_shader);
532 533
533 return program; 534 return program;
534 } 535 }
535 536
536 blink::WebInputEventResult TestPlugin::HandleInputEvent( 537 blink::WebInputEventResult TestPlugin::HandleInputEvent(
537 const blink::WebInputEvent& event, 538 const blink::WebCoalescedInputEvent& coalesced_event,
538 blink::WebCursorInfo& info) { 539 blink::WebCursorInfo& info) {
540 const blink::WebInputEvent& event = coalesced_event.Event();
539 const char* event_name = blink::WebInputEvent::GetName(event.GetType()); 541 const char* event_name = blink::WebInputEvent::GetName(event.GetType());
540 if (!strcmp(event_name, "") || !strcmp(event_name, "Undefined")) 542 if (!strcmp(event_name, "") || !strcmp(event_name, "Undefined"))
541 event_name = "unknown"; 543 event_name = "unknown";
542 delegate_->PrintMessage(std::string("Plugin received event: ") + event_name + 544 delegate_->PrintMessage(std::string("Plugin received event: ") + event_name +
543 "\n"); 545 "\n");
544 if (print_event_details_) 546 if (print_event_details_)
545 PrintEventDetails(delegate_, event); 547 PrintEventDetails(delegate_, event);
546 if (print_user_gesture_status_) 548 if (print_user_gesture_status_)
547 delegate_->PrintMessage( 549 delegate_->PrintMessage(
548 std::string("* ") + 550 std::string("* ") +
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 return kPluginPersistsMimeType; 609 return kPluginPersistsMimeType;
608 } 610 }
609 611
610 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { 612 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) {
611 return mime_type == TestPlugin::MimeType() || 613 return mime_type == TestPlugin::MimeType() ||
612 mime_type == PluginPersistsMimeType() || 614 mime_type == PluginPersistsMimeType() ||
613 mime_type == CanCreateWithoutRendererMimeType(); 615 mime_type == CanCreateWithoutRendererMimeType();
614 } 616 }
615 617
616 } // namespace test_runner 618 } // namespace test_runner
OLDNEW
« no previous file with comments | « content/shell/test_runner/test_plugin.h ('k') | ppapi/api/ppb_input_event.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698