OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/render_widget_fullscreen_pepper.h" | 5 #include "chrome/renderer/render_widget_fullscreen_pepper.h" |
6 | 6 |
7 #include "chrome/common/render_messages.h" | 7 #include "chrome/common/render_messages.h" |
8 #include "chrome/renderer/render_thread.h" | 8 #include "chrome/renderer/render_thread.h" |
9 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" |
10 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 virtual ~WidgetFullscreenContainer() { } | 138 virtual ~WidgetFullscreenContainer() { } |
139 | 139 |
140 virtual void Invalidate() { | 140 virtual void Invalidate() { |
141 widget_->GenerateFullRepaint(); | 141 widget_->GenerateFullRepaint(); |
142 } | 142 } |
143 | 143 |
144 virtual void InvalidateRect(const WebKit::WebRect& rect) { | 144 virtual void InvalidateRect(const WebKit::WebRect& rect) { |
145 widget_->didInvalidateRect(rect); | 145 widget_->didInvalidateRect(rect); |
146 } | 146 } |
147 | 147 |
| 148 virtual void ScrollRect(int dx, int dy, const WebKit::WebRect& rect) { |
| 149 widget_->didScrollRect(dx, dy, rect); |
| 150 } |
| 151 |
148 virtual void Destroy() { | 152 virtual void Destroy() { |
149 widget_->SendClose(); | 153 widget_->SendClose(); |
150 } | 154 } |
151 | 155 |
152 private: | 156 private: |
153 RenderWidgetFullscreenPepper* widget_; | 157 RenderWidgetFullscreenPepper* widget_; |
154 | 158 |
155 DISALLOW_COPY_AND_ASSIGN(WidgetFullscreenContainer); | 159 DISALLOW_COPY_AND_ASSIGN(WidgetFullscreenContainer); |
156 }; | 160 }; |
157 | 161 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 void RenderWidgetFullscreenPepper::SendClose() { | 207 void RenderWidgetFullscreenPepper::SendClose() { |
204 // This function is called by the plugin instance as it's going away, so reset | 208 // This function is called by the plugin instance as it's going away, so reset |
205 // plugin_ to NULL to avoid calling into a dangling pointer e.g. on Close(). | 209 // plugin_ to NULL to avoid calling into a dangling pointer e.g. on Close(). |
206 plugin_ = NULL; | 210 plugin_ = NULL; |
207 Send(new ViewHostMsg_Close(routing_id_)); | 211 Send(new ViewHostMsg_Close(routing_id_)); |
208 } | 212 } |
209 | 213 |
210 void RenderWidgetFullscreenPepper::GenerateFullRepaint() { | 214 void RenderWidgetFullscreenPepper::GenerateFullRepaint() { |
211 didInvalidateRect(gfx::Rect(size_.width(), size_.height())); | 215 didInvalidateRect(gfx::Rect(size_.width(), size_.height())); |
212 } | 216 } |
OLD | NEW |