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

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
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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 } 529 }
529 if (vertex_shader) 530 if (vertex_shader)
530 gl_->DeleteShader(vertex_shader); 531 gl_->DeleteShader(vertex_shader);
531 if (fragment_shader) 532 if (fragment_shader)
532 gl_->DeleteShader(fragment_shader); 533 gl_->DeleteShader(fragment_shader);
533 534
534 return program; 535 return program;
535 } 536 }
536 537
537 blink::WebInputEventResult TestPlugin::HandleInputEvent( 538 blink::WebInputEventResult TestPlugin::HandleInputEvent(
538 const blink::WebInputEvent& event, 539 const blink::WebCoalescedInputEvent& coalesced_event,
539 blink::WebCursorInfo& info) { 540 blink::WebCursorInfo& info) {
541 const blink::WebInputEvent& event = coalesced_event.Event();
540 const char* event_name = blink::WebInputEvent::GetName(event.GetType()); 542 const char* event_name = blink::WebInputEvent::GetName(event.GetType());
541 if (!strcmp(event_name, "") || !strcmp(event_name, "Undefined")) 543 if (!strcmp(event_name, "") || !strcmp(event_name, "Undefined"))
542 event_name = "unknown"; 544 event_name = "unknown";
543 delegate_->PrintMessage(std::string("Plugin received event: ") + event_name + 545 delegate_->PrintMessage(std::string("Plugin received event: ") + event_name +
544 "\n"); 546 "\n");
545 if (print_event_details_) 547 if (print_event_details_)
546 PrintEventDetails(delegate_, event); 548 PrintEventDetails(delegate_, event);
547 if (print_user_gesture_status_) 549 if (print_user_gesture_status_)
548 delegate_->PrintMessage( 550 delegate_->PrintMessage(
549 std::string("* ") + 551 std::string("* ") +
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 return kPluginPersistsMimeType; 610 return kPluginPersistsMimeType;
609 } 611 }
610 612
611 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { 613 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) {
612 return mime_type == TestPlugin::MimeType() || 614 return mime_type == TestPlugin::MimeType() ||
613 mime_type == PluginPersistsMimeType() || 615 mime_type == PluginPersistsMimeType() ||
614 mime_type == CanCreateWithoutRendererMimeType(); 616 mime_type == CanCreateWithoutRendererMimeType();
615 } 617 }
616 618
617 } // namespace test_runner 619 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698