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

Side by Side Diff: webkit/glue/webplugin_impl.cc

Issue 174513: Add isVisible parameter to WebPlugin::updateGeometry.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 months 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 | « webkit/glue/webplugin_impl.h ('k') | webkit/tools/layout_tests/test_expectations.txt » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "config.h" 5 #include "config.h"
6 6
7 #include "Document.h" 7 #include "Document.h"
8 #include "DocumentLoader.h" 8 #include "DocumentLoader.h"
9 #include "FormState.h" 9 #include "FormState.h"
10 #include "Frame.h" 10 #include "Frame.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 delegate_->Paint(context, paint_rect); 279 delegate_->Paint(context, paint_rect);
280 280
281 #if WEBKIT_USING_SKIA 281 #if WEBKIT_USING_SKIA
282 canvas->endPlatformPaint(); 282 canvas->endPlatformPaint();
283 #endif 283 #endif
284 } 284 }
285 285
286 void WebPluginImpl::updateGeometry( 286 void WebPluginImpl::updateGeometry(
287 const WebRect& window_rect, const WebRect& clip_rect, 287 const WebRect& window_rect, const WebRect& clip_rect,
288 const WebVector<WebRect>& cutout_rects) { 288 const WebVector<WebRect>& cutout_rects, bool is_visible) {
289 if (window_) { 289 if (window_) {
290 WebViewDelegate* view_delegate = GetWebViewDelegate(); 290 WebViewDelegate* view_delegate = GetWebViewDelegate();
291 if (view_delegate) { 291 if (view_delegate) {
292 // Notify the window hosting the plugin (the WebViewDelegate) that 292 // Notify the window hosting the plugin (the WebViewDelegate) that
293 // it needs to adjust the plugin, so that all the HWNDs can be moved 293 // it needs to adjust the plugin, so that all the HWNDs can be moved
294 // at the same time. 294 // at the same time.
295 WebPluginGeometry move; 295 WebPluginGeometry move;
296 move.window = window_; 296 move.window = window_;
297 move.window_rect = window_rect; 297 move.window_rect = window_rect;
298 move.clip_rect = clip_rect; 298 move.clip_rect = clip_rect;
299 for (size_t i = 0; i < cutout_rects.size(); ++i) 299 for (size_t i = 0; i < cutout_rects.size(); ++i)
300 move.cutout_rects.push_back(cutout_rects[i]); 300 move.cutout_rects.push_back(cutout_rects[i]);
301 move.rects_valid = true; 301 move.rects_valid = true;
302 move.visible = true; // Assume visible or else we wouldn't be here. 302 move.visible = is_visible;
303 303
304 view_delegate->DidMovePlugin(move); 304 view_delegate->DidMovePlugin(move);
305 } 305 }
306 } 306 }
307 307
308 if (first_geometry_update_ || window_rect != window_rect_ || 308 if (first_geometry_update_ || window_rect != window_rect_ ||
309 clip_rect != clip_rect_) { 309 clip_rect != clip_rect_) {
310 window_rect_ = window_rect; 310 window_rect_ = window_rect;
311 clip_rect_ = clip_rect; 311 clip_rect_ = clip_rect;
312 // Notify the plugin that its parameters have changed. 312 // Notify the plugin that its parameters have changed.
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 webframe_ = NULL; 1141 webframe_ = NULL;
1142 method_factory_.RevokeAll(); 1142 method_factory_.RevokeAll();
1143 } 1143 }
1144 1144
1145 WebViewDelegate* WebPluginImpl::GetWebViewDelegate() { 1145 WebViewDelegate* WebPluginImpl::GetWebViewDelegate() {
1146 if (!webframe_) 1146 if (!webframe_)
1147 return NULL; 1147 return NULL;
1148 WebViewImpl* webview = webframe_->GetWebViewImpl(); 1148 WebViewImpl* webview = webframe_->GetWebViewImpl();
1149 return webview ? webview->delegate() : NULL; 1149 return webview ? webview->delegate() : NULL;
1150 } 1150 }
OLDNEW
« no previous file with comments | « webkit/glue/webplugin_impl.h ('k') | webkit/tools/layout_tests/test_expectations.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698