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/browser/renderer_host/render_widget_host.h" | 5 #include "chrome/browser/renderer_host/render_widget_host.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/histogram.h" | 8 #include "base/histogram.h" |
9 #include "base/keyboard_codes.h" | 9 #include "base/keyboard_codes.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
878 void RenderWidgetHost::OnMsgImeUpdateStatus(int control, | 878 void RenderWidgetHost::OnMsgImeUpdateStatus(int control, |
879 const gfx::Rect& caret_rect) { | 879 const gfx::Rect& caret_rect) { |
880 if (view_) { | 880 if (view_) { |
881 view_->IMEUpdateStatus(control, caret_rect); | 881 view_->IMEUpdateStatus(control, caret_rect); |
882 } | 882 } |
883 } | 883 } |
884 | 884 |
885 #if defined(OS_LINUX) | 885 #if defined(OS_LINUX) |
886 | 886 |
887 void RenderWidgetHost::OnMsgCreatePluginContainer(gfx::PluginWindowHandle id) { | 887 void RenderWidgetHost::OnMsgCreatePluginContainer(gfx::PluginWindowHandle id) { |
888 view_->CreatePluginContainer(id); | 888 // TODO(piman): view_ can only be NULL with delayed view creation in |
889 // extensions (see ExtensionHost::CreateRenderViewSoon). Figure out how to | |
890 // support plugins in that case. | |
Evan Martin
2009/12/01 06:29:15
Can you add a NOTIMPLEMENTED in the "else" case?
| |
891 if (view_) { | |
892 view_->CreatePluginContainer(id); | |
893 } | |
889 } | 894 } |
890 | 895 |
891 void RenderWidgetHost::OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id) { | 896 void RenderWidgetHost::OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id) { |
892 view_->DestroyPluginContainer(id); | 897 if (view_) { |
898 view_->DestroyPluginContainer(id); | |
899 } | |
893 } | 900 } |
894 | 901 |
895 #elif defined(OS_MACOSX) | 902 #elif defined(OS_MACOSX) |
896 | 903 |
897 void RenderWidgetHost::OnMsgShowPopup( | 904 void RenderWidgetHost::OnMsgShowPopup( |
898 const ViewHostMsg_ShowPopup_Params& params) { | 905 const ViewHostMsg_ShowPopup_Params& params) { |
899 view_->ShowPopupWithItems(params.bounds, | 906 view_->ShowPopupWithItems(params.bounds, |
900 params.item_height, | 907 params.item_height, |
901 params.selected_item, | 908 params.selected_item, |
902 params.popup_items); | 909 params.popup_items); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1077 // Send the pending PaintRect_ACK message after sending all pending key | 1084 // Send the pending PaintRect_ACK message after sending all pending key |
1078 // events or after a certain duration, so that the renderer can process | 1085 // events or after a certain duration, so that the renderer can process |
1079 // the updates caused by the key events in batch. | 1086 // the updates caused by the key events in batch. |
1080 if (paint_ack_postponed_ && (pending_key_events_ == 0 || | 1087 if (paint_ack_postponed_ && (pending_key_events_ == 0 || |
1081 (TimeTicks::Now() - paint_ack_postponed_time_).InMilliseconds() > | 1088 (TimeTicks::Now() - paint_ack_postponed_time_).InMilliseconds() > |
1082 kPaintACKMsgMaxPostponedDurationMS)) { | 1089 kPaintACKMsgMaxPostponedDurationMS)) { |
1083 paint_ack_postponed_ = false; | 1090 paint_ack_postponed_ = false; |
1084 Send(new ViewMsg_PaintRect_ACK(routing_id_)); | 1091 Send(new ViewMsg_PaintRect_ACK(routing_id_)); |
1085 } | 1092 } |
1086 } | 1093 } |
OLD | NEW |