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

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

Issue 12673002: pepper: Use the RenderThread's shared context as the parent context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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) 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/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 void PluginInstance::UpdateFlashFullscreenState(bool flash_fullscreen) { 1488 void PluginInstance::UpdateFlashFullscreenState(bool flash_fullscreen) {
1489 bool is_mouselock_pending = TrackedCallback::IsPending(lock_mouse_callback_); 1489 bool is_mouselock_pending = TrackedCallback::IsPending(lock_mouse_callback_);
1490 1490
1491 if (flash_fullscreen == flash_fullscreen_) { 1491 if (flash_fullscreen == flash_fullscreen_) {
1492 // Manually clear callback when fullscreen fails with mouselock pending. 1492 // Manually clear callback when fullscreen fails with mouselock pending.
1493 if (!flash_fullscreen && is_mouselock_pending) 1493 if (!flash_fullscreen && is_mouselock_pending)
1494 lock_mouse_callback_->Run(PP_ERROR_FAILED); 1494 lock_mouse_callback_->Run(PP_ERROR_FAILED);
1495 return; 1495 return;
1496 } 1496 }
1497 1497
1498 PPB_Graphics3D_Impl* graphics_3d = bound_graphics_3d_.get(); 1498 if (bound_graphics_3d_)
1499 if (graphics_3d) {
1500 if (flash_fullscreen) {
1501 fullscreen_container_->ReparentContext(graphics_3d->platform_context());
1502 } else {
1503 delegate_->ReparentContext(graphics_3d->platform_context());
1504 }
1505 UpdateLayer(); 1499 UpdateLayer();
1506 }
1507 1500
1508 bool old_plugin_focus = PluginHasFocus(); 1501 bool old_plugin_focus = PluginHasFocus();
1509 flash_fullscreen_ = flash_fullscreen; 1502 flash_fullscreen_ = flash_fullscreen;
1510 if (is_mouselock_pending && !delegate()->IsMouseLocked(this)) { 1503 if (is_mouselock_pending && !delegate()->IsMouseLocked(this)) {
1511 if (!IsProcessingUserGesture() && 1504 if (!IsProcessingUserGesture() &&
1512 !module_->permissions().HasPermission( 1505 !module_->permissions().HasPermission(
1513 ::ppapi::PERMISSION_BYPASS_USER_GESTURE)) { 1506 ::ppapi::PERMISSION_BYPASS_USER_GESTURE)) {
1514 lock_mouse_callback_->Run(PP_ERROR_NO_USER_GESTURE); 1507 lock_mouse_callback_->Run(PP_ERROR_NO_USER_GESTURE);
1515 } else { 1508 } else {
1516 // Open a user gesture here so the Webkit user gesture checks will succeed 1509 // Open a user gesture here so the Webkit user gesture checks will succeed
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 screen_size_for_fullscreen_ = gfx::Size(); 2475 screen_size_for_fullscreen_ = gfx::Size();
2483 WebElement element = container_->element(); 2476 WebElement element = container_->element();
2484 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2477 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2485 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2478 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2486 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2479 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2487 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2480 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2488 } 2481 }
2489 2482
2490 } // namespace ppapi 2483 } // namespace ppapi
2491 } // namespace webkit 2484 } // namespace webkit
OLDNEW
« content/renderer/render_widget_fullscreen_pepper.cc ('K') | « webkit/plugins/ppapi/plugin_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698