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.h" | 5 #include "chrome/renderer/render_widget.h" |
6 | 6 |
7 #include "app/surface/transport_dib.h" | 7 #include "app/surface/transport_dib.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 Send(new ViewHostMsg_ShowPopup(routing_id_, *popup_params_)); | 648 Send(new ViewHostMsg_ShowPopup(routing_id_, *popup_params_)); |
649 popup_params_.reset(); | 649 popup_params_.reset(); |
650 } else { | 650 } else { |
651 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); | 651 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); |
652 } | 652 } |
653 SetPendingWindowRect(initial_pos_); | 653 SetPendingWindowRect(initial_pos_); |
654 } | 654 } |
655 } | 655 } |
656 | 656 |
657 void RenderWidget::didFocus() { | 657 void RenderWidget::didFocus() { |
658 Send(new ViewHostMsg_Focus(routing_id_)); | |
659 } | 658 } |
660 | 659 |
661 void RenderWidget::didBlur() { | 660 void RenderWidget::didBlur() { |
662 Send(new ViewHostMsg_Blur(routing_id_)); | |
663 } | 661 } |
664 | 662 |
665 void RenderWidget::DoDeferredClose() { | 663 void RenderWidget::DoDeferredClose() { |
666 Send(new ViewHostMsg_Close(routing_id_)); | 664 Send(new ViewHostMsg_Close(routing_id_)); |
667 } | 665 } |
668 | 666 |
669 void RenderWidget::closeWidgetSoon() { | 667 void RenderWidget::closeWidgetSoon() { |
670 // If a page calls window.close() twice, we'll end up here twice, but that's | 668 // If a page calls window.close() twice, we'll end up here twice, but that's |
671 // OK. It is safe to send multiple Close messages. | 669 // OK. It is safe to send multiple Close messages. |
672 | 670 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 | 944 |
947 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 945 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
948 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 946 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
949 i != plugin_window_moves_.end(); ++i) { | 947 i != plugin_window_moves_.end(); ++i) { |
950 if (i->window == window) { | 948 if (i->window == window) { |
951 plugin_window_moves_.erase(i); | 949 plugin_window_moves_.erase(i); |
952 break; | 950 break; |
953 } | 951 } |
954 } | 952 } |
955 } | 953 } |
OLD | NEW |