OLD | NEW |
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/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
9 #include "content/renderer/renderer_gl_context.h" | 9 #include "content/renderer/renderer_gl_context.h" |
10 #include "content/renderer/gpu_channel_host.h" | 10 #include "content/renderer/gpu_channel_host.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 return size_; | 52 return size_; |
53 } | 53 } |
54 | 54 |
55 virtual void resize(const WebSize& size) { | 55 virtual void resize(const WebSize& size) { |
56 size_ = size; | 56 size_ = size; |
57 WebRect plugin_rect(0, 0, size_.width, size_.height); | 57 WebRect plugin_rect(0, 0, size_.width, size_.height); |
58 plugin_->ViewChanged(plugin_rect, plugin_rect); | 58 plugin_->ViewChanged(plugin_rect, plugin_rect); |
59 widget_->Invalidate(); | 59 widget_->Invalidate(); |
60 } | 60 } |
61 | 61 |
| 62 #ifndef WEBWIDGET_HAS_ANIMATE_CHANGES |
62 virtual void animate() { | 63 virtual void animate() { |
63 } | 64 } |
| 65 #else |
| 66 virtual void animate(double frameBeginTime) { |
| 67 } |
| 68 #endif |
64 | 69 |
65 virtual void layout() { | 70 virtual void layout() { |
66 } | 71 } |
67 | 72 |
68 virtual void paint(WebCanvas* canvas, const WebRect& rect) { | 73 virtual void paint(WebCanvas* canvas, const WebRect& rect) { |
69 WebRect plugin_rect(0, 0, size_.width, size_.height); | 74 WebRect plugin_rect(0, 0, size_.width, size_.height); |
70 plugin_->Paint(canvas, plugin_rect, rect); | 75 plugin_->Paint(canvas, plugin_rect, rect); |
71 } | 76 } |
72 | 77 |
73 virtual void composite(bool finish) { | 78 virtual void composite(bool finish) { |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 NewRunnableFunction(DestroyContext, context_, program_, buffer_)); | 469 NewRunnableFunction(DestroyContext, context_, program_, buffer_)); |
465 context_ = NULL; | 470 context_ = NULL; |
466 program_ = 0; | 471 program_ = 0; |
467 buffer_ = 0; | 472 buffer_ = 0; |
468 OnSwapBuffersAborted(); | 473 OnSwapBuffersAborted(); |
469 } | 474 } |
470 | 475 |
471 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() { | 476 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() { |
472 OnSwapBuffersComplete(); | 477 OnSwapBuffersComplete(); |
473 } | 478 } |
OLD | NEW |