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

Side by Side Diff: content/renderer/render_widget_fullscreen_pepper.cc

Issue 8483003: Callback API Change: Reimplement Bind(); support IgnoreResult, full currying, and use less types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 1 month 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 | « content/browser/plugin_service_browsertest.cc ('k') | media/tools/player_x11/player_x11.cc » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer/render_widget_fullscreen_pepper.h" 5 #include "content/renderer/render_widget_fullscreen_pepper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/renderer/gpu/gpu_channel_host.h" 10 #include "content/renderer/gpu/gpu_channel_host.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 490
491 void RenderWidgetFullscreenPepper::OnLostContext( 491 void RenderWidgetFullscreenPepper::OnLostContext(
492 RendererGLContext::ContextLostReason) { 492 RendererGLContext::ContextLostReason) {
493 if (!context_) 493 if (!context_)
494 return; 494 return;
495 // Destroy the context later, in case we got called from InitContext for 495 // Destroy the context later, in case we got called from InitContext for
496 // example. We still need to reset context_ now so that a new context gets 496 // example. We still need to reset context_ now so that a new context gets
497 // created when the plugin recreates its own. 497 // created when the plugin recreates its own.
498 MessageLoop::current()->PostTask( 498 MessageLoop::current()->PostTask(
499 FROM_HERE, 499 FROM_HERE,
500 base::Bind(DestroyContext, context_, program_, buffer_)); 500 base::Bind(&DestroyContext, context_, program_, buffer_));
501 context_ = NULL; 501 context_ = NULL;
502 program_ = 0; 502 program_ = 0;
503 buffer_ = 0; 503 buffer_ = 0;
504 OnSwapBuffersAborted(); 504 OnSwapBuffersAborted();
505 CheckCompositing(); 505 CheckCompositing();
506 } 506 }
507 507
508 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() { 508 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() {
509 OnSwapBuffersComplete(); 509 OnSwapBuffersComplete();
510 } 510 }
511 511
512 RendererGLContext* 512 RendererGLContext*
513 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { 513 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() {
514 if (!context_) { 514 if (!context_) {
515 CreateContext(); 515 CreateContext();
516 } 516 }
517 if (!context_) 517 if (!context_)
518 return NULL; 518 return NULL;
519 return context_; 519 return context_;
520 } 520 }
OLDNEW
« no previous file with comments | « content/browser/plugin_service_browsertest.cc ('k') | media/tools/player_x11/player_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698