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

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

Issue 10824156: Remove CHECK and NOTREACHED for mouse lock, fix full screen transition. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_mouse_lock_rpc_server.cc ('k') | 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 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 bool PluginInstance::IsProcessingUserGesture() { 1626 bool PluginInstance::IsProcessingUserGesture() {
1627 PP_TimeTicks now = 1627 PP_TimeTicks now =
1628 ::ppapi::TimeTicksToPPTimeTicks(base::TimeTicks::Now()); 1628 ::ppapi::TimeTicksToPPTimeTicks(base::TimeTicks::Now());
1629 // Give a lot of slack so tests won't be flaky. Well behaved plugins will 1629 // Give a lot of slack so tests won't be flaky. Well behaved plugins will
1630 // close the user gesture. 1630 // close the user gesture.
1631 const PP_TimeTicks kUserGestureDurationInSeconds = 10.0; 1631 const PP_TimeTicks kUserGestureDurationInSeconds = 10.0;
1632 return (now - pending_user_gesture_ < kUserGestureDurationInSeconds); 1632 return (now - pending_user_gesture_ < kUserGestureDurationInSeconds);
1633 } 1633 }
1634 1634
1635 void PluginInstance::OnLockMouseACK(bool succeeded) { 1635 void PluginInstance::OnLockMouseACK(bool succeeded) {
1636 if (!TrackedCallback::IsPending(lock_mouse_callback_)) { 1636 if (!TrackedCallback::IsPending(lock_mouse_callback_)) {
viettrungluu 2012/08/03 00:50:04 Get rid of the braces (for consistency with the ot
1637 NOTREACHED();
1638 return; 1637 return;
1639 } 1638 }
1640 TrackedCallback::ClearAndRun(&lock_mouse_callback_, 1639 TrackedCallback::ClearAndRun(&lock_mouse_callback_,
1641 succeeded ? PP_OK : PP_ERROR_FAILED); 1640 succeeded ? PP_OK : PP_ERROR_FAILED);
1642 } 1641 }
1643 1642
1644 void PluginInstance::OnMouseLockLost() { 1643 void PluginInstance::OnMouseLockLost() {
1645 if (LoadMouseLockInterface()) 1644 if (LoadMouseLockInterface())
1646 plugin_mouse_lock_interface_->MouseLockLost(pp_instance()); 1645 plugin_mouse_lock_interface_->MouseLockLost(pp_instance());
1647 } 1646 }
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 screen_size_for_fullscreen_ = gfx::Size(); 2242 screen_size_for_fullscreen_ = gfx::Size();
2244 WebElement element = container_->element(); 2243 WebElement element = container_->element();
2245 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2244 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2246 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2245 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2247 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2246 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2248 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2247 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2249 } 2248 }
2250 2249
2251 } // namespace ppapi 2250 } // namespace ppapi
2252 } // namespace webkit 2251 } // namespace webkit
OLDNEW
« no previous file with comments | « ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_mouse_lock_rpc_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698