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

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

Issue 67147: linux: make windowless plugins work again after r12179 regressed it. (Closed)
Patch Set: Created 11 years, 8 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
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 #include "webkit/glue/webplugin_impl.h" 6 #include "webkit/glue/webplugin_impl.h"
7 7
8 #include "Cursor.h" 8 #include "Cursor.h"
9 #include "Document.h" 9 #include "Document.h"
10 #include "DocumentLoader.h" 10 #include "DocumentLoader.h"
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 if (!webview->delegate()) { 654 if (!webview->delegate()) {
655 return; 655 return;
656 } 656 }
657 657
658 WebCore::IntRect window_rect; 658 WebCore::IntRect window_rect;
659 WebCore::IntRect clip_rect; 659 WebCore::IntRect clip_rect;
660 std::vector<gfx::Rect> cutout_rects; 660 std::vector<gfx::Rect> cutout_rects;
661 CalculateBounds(rect, &window_rect, &clip_rect, &cutout_rects); 661 CalculateBounds(rect, &window_rect, &clip_rect, &cutout_rects);
662 662
663 if (widget_dimensions_changed) { 663 if (widget_dimensions_changed) {
664 // Notify the plugin that its parameters have changed.
664 delegate_->UpdateGeometry( 665 delegate_->UpdateGeometry(
665 webkit_glue::FromIntRect(window_rect), 666 webkit_glue::FromIntRect(window_rect),
666 webkit_glue::FromIntRect(clip_rect)); 667 webkit_glue::FromIntRect(clip_rect));
667 } 668 }
668 669
669 if (window_) { 670 if (window_) {
670 // Let the WebViewDelegate know that the plugin window needs to be moved, 671 // Notify the window hosting the plugin (the WebViewDelegate) that
671 // so that all the HWNDs are moved together. 672 // it needs to adjust the plugin, so that all the HWNDs can be moved
673 // at the same time.
672 WebPluginGeometry move; 674 WebPluginGeometry move;
673 move.window = window_; 675 move.window = window_;
674 move.window_rect = webkit_glue::FromIntRect(window_rect); 676 move.window_rect = webkit_glue::FromIntRect(window_rect);
675 move.clip_rect = webkit_glue::FromIntRect(clip_rect); 677 move.clip_rect = webkit_glue::FromIntRect(clip_rect);
676 move.cutout_rects = cutout_rects; 678 move.cutout_rects = cutout_rects;
677 move.visible = visible_; 679 move.visible = visible_;
678 680
679 webview->delegate()->DidMove(webview, move); 681 webview->delegate()->DidMove(webview, move);
680 } 682 }
681 683
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 client_index = clients_.erase(client_index); 1431 client_index = clients_.erase(client_index);
1430 if (resource_client) 1432 if (resource_client)
1431 resource_client->DidFail(); 1433 resource_client->DidFail();
1432 } 1434 }
1433 1435
1434 // This needs to be called now and not in the destructor since the 1436 // This needs to be called now and not in the destructor since the
1435 // webframe_ might not be valid anymore. 1437 // webframe_ might not be valid anymore.
1436 webframe_->set_plugin_delegate(NULL); 1438 webframe_->set_plugin_delegate(NULL);
1437 webframe_ = NULL; 1439 webframe_ = NULL;
1438 } 1440 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698