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

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

Issue 4365001: Use optimized scrolling for pepper plugins. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/plugins/pepper_fullscreen_container.h » ('j') | webkit/glue/plugins/pepper_plugin_instance.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698