OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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.h" | 5 #include "chrome/renderer/render_widget.h" |
6 | 6 |
7 #include "base/gfx/point.h" | 7 #include "base/gfx/point.h" |
8 #include "base/gfx/size.h" | 8 #include "base/gfx/size.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 WebScreenInfo RenderWidget::screenInfo() { | 836 WebScreenInfo RenderWidget::screenInfo() { |
837 WebScreenInfo results; | 837 WebScreenInfo results; |
838 Send(new ViewHostMsg_GetScreenInfo(routing_id_, host_window_, &results)); | 838 Send(new ViewHostMsg_GetScreenInfo(routing_id_, host_window_, &results)); |
839 return results; | 839 return results; |
840 } | 840 } |
841 | 841 |
842 void RenderWidget::SchedulePluginMove(const WebPluginGeometry& move) { | 842 void RenderWidget::SchedulePluginMove(const WebPluginGeometry& move) { |
843 size_t i = 0; | 843 size_t i = 0; |
844 for (; i < plugin_window_moves_.size(); ++i) { | 844 for (; i < plugin_window_moves_.size(); ++i) { |
845 if (plugin_window_moves_[i].window == move.window) { | 845 if (plugin_window_moves_[i].window == move.window) { |
846 plugin_window_moves_[i] = move; | 846 if (move.rects_valid) { |
| 847 plugin_window_moves_[i] = move; |
| 848 } else { |
| 849 plugin_window_moves_[i].visible = move.visible; |
| 850 } |
847 break; | 851 break; |
848 } | 852 } |
849 } | 853 } |
850 | 854 |
851 if (i == plugin_window_moves_.size()) | 855 if (i == plugin_window_moves_.size()) |
852 plugin_window_moves_.push_back(move); | 856 plugin_window_moves_.push_back(move); |
853 } | 857 } |
854 | 858 |
855 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 859 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
856 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 860 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
857 i != plugin_window_moves_.end(); ++i) { | 861 i != plugin_window_moves_.end(); ++i) { |
858 if (i->window == window) { | 862 if (i->window == window) { |
859 plugin_window_moves_.erase(i); | 863 plugin_window_moves_.erase(i); |
860 break; | 864 break; |
861 } | 865 } |
862 } | 866 } |
863 } | 867 } |
OLD | NEW |