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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 10780017: Merge 146513 - Don't close pending user gesture when PluginInstance receives ACKs for input events. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 underline.thick = true; 1675 underline.thick = true;
1676 underlines.push_back(underline); 1676 underlines.push_back(underline);
1677 } 1677 }
1678 1678
1679 delegate()->SimulateImeSetComposition( 1679 delegate()->SimulateImeSetComposition(
1680 utf16_text, underlines, offsets[0], offsets[1]); 1680 utf16_text, underlines, offsets[0], offsets[1]);
1681 } 1681 }
1682 1682
1683 void PluginInstance::ClosePendingUserGesture(PP_Instance instance, 1683 void PluginInstance::ClosePendingUserGesture(PP_Instance instance,
1684 PP_TimeTicks timestamp) { 1684 PP_TimeTicks timestamp) {
1685 // Close the pending user gesture if the plugin had a chance to respond. 1685 // Do nothing so that the pending user gesture will stay open for
1686 // Don't close the pending user gesture if the timestamps are equal since 1686 // kUserGestureDurationInSeconds.
1687 // there may be multiple input events with the same timestamp. 1687 // TODO(yzshen): remove the code for closing pending user gesture.
1688 if (timestamp > pending_user_gesture_)
1689 pending_user_gesture_ = 0.0;
1690 } 1688 }
1691 1689
1692 PP_Bool PluginInstance::BindGraphics(PP_Instance instance, 1690 PP_Bool PluginInstance::BindGraphics(PP_Instance instance,
1693 PP_Resource device) { 1691 PP_Resource device) {
1694 // The Graphics3D instance can't be destroyed until we call 1692 // The Graphics3D instance can't be destroyed until we call
1695 // setBackingTextureId. 1693 // setBackingTextureId.
1696 scoped_refptr< ::ppapi::Resource> old_graphics = bound_graphics_; 1694 scoped_refptr< ::ppapi::Resource> old_graphics = bound_graphics_;
1697 if (bound_graphics_.get()) { 1695 if (bound_graphics_.get()) {
1698 if (GetBoundGraphics2D()) { 1696 if (GetBoundGraphics2D()) {
1699 GetBoundGraphics2D()->BindToInstance(NULL); 1697 GetBoundGraphics2D()->BindToInstance(NULL);
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
2152 screen_size_for_fullscreen_ = gfx::Size(); 2150 screen_size_for_fullscreen_ = gfx::Size();
2153 WebElement element = container_->element(); 2151 WebElement element = container_->element();
2154 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2152 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2155 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2153 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2156 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2154 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2157 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2155 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2158 } 2156 }
2159 2157
2160 } // namespace ppapi 2158 } // namespace ppapi
2161 } // namespace webkit 2159 } // namespace webkit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698