| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // WebWidget API | 46 // WebWidget API |
| 47 virtual void close() { | 47 virtual void close() { |
| 48 delete this; | 48 delete this; |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual WebSize size() { | 51 virtual WebSize size() { |
| 52 return size_; | 52 return size_; |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual void willStartLiveResize() { |
| 56 } |
| 57 |
| 55 virtual void resize(const WebSize& size) { | 58 virtual void resize(const WebSize& size) { |
| 56 size_ = size; | 59 size_ = size; |
| 57 WebRect plugin_rect(0, 0, size_.width, size_.height); | 60 WebRect plugin_rect(0, 0, size_.width, size_.height); |
| 58 plugin_->ViewChanged(plugin_rect, plugin_rect); | 61 plugin_->ViewChanged(plugin_rect, plugin_rect); |
| 59 widget_->Invalidate(); | 62 widget_->Invalidate(); |
| 60 } | 63 } |
| 61 | 64 |
| 65 virtual void willEndLiveResize() { |
| 66 } |
| 67 |
| 62 virtual void animate() { | 68 virtual void animate() { |
| 63 } | 69 } |
| 64 | 70 |
| 65 virtual void layout() { | 71 virtual void layout() { |
| 66 } | 72 } |
| 67 | 73 |
| 68 virtual void paint(WebCanvas* canvas, const WebRect& rect) { | 74 virtual void paint(WebCanvas* canvas, const WebRect& rect) { |
| 69 WebRect plugin_rect(0, 0, size_.width, size_.height); | 75 WebRect plugin_rect(0, 0, size_.width, size_.height); |
| 70 plugin_->Paint(canvas, plugin_rect, rect); | 76 plugin_->Paint(canvas, plugin_rect, rect); |
| 71 } | 77 } |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // Destroy the context later, in case we got called from InitContext for | 459 // Destroy the context later, in case we got called from InitContext for |
| 454 // example. We still need to reset context_ now so that a new context gets | 460 // example. We still need to reset context_ now so that a new context gets |
| 455 // created when the plugin recreates its own. | 461 // created when the plugin recreates its own. |
| 456 MessageLoop::current()->PostTask( | 462 MessageLoop::current()->PostTask( |
| 457 FROM_HERE, | 463 FROM_HERE, |
| 458 NewRunnableFunction(DestroyContext, context_, program_, buffer_)); | 464 NewRunnableFunction(DestroyContext, context_, program_, buffer_)); |
| 459 context_ = NULL; | 465 context_ = NULL; |
| 460 program_ = 0; | 466 program_ = 0; |
| 461 buffer_ = 0; | 467 buffer_ = 0; |
| 462 } | 468 } |
| OLD | NEW |