| 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/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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
| 10 #include "base/keyboard_codes.h" | 10 #include "base/keyboard_codes.h" |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 if (view_) | 913 if (view_) |
| 914 view_->ImeUpdateTextInputState(type, caret_rect); | 914 view_->ImeUpdateTextInputState(type, caret_rect); |
| 915 } | 915 } |
| 916 | 916 |
| 917 void RenderWidgetHost::OnMsgImeCancelComposition() { | 917 void RenderWidgetHost::OnMsgImeCancelComposition() { |
| 918 if (view_) | 918 if (view_) |
| 919 view_->ImeCancelComposition(); | 919 view_->ImeCancelComposition(); |
| 920 } | 920 } |
| 921 | 921 |
| 922 void RenderWidgetHost::OnMsgGpuRenderingActivated(bool activated) { | 922 void RenderWidgetHost::OnMsgGpuRenderingActivated(bool activated) { |
| 923 #if defined(OS_MACOSX) |
| 924 bool old_state = is_gpu_rendering_active_; |
| 925 #endif |
| 923 is_gpu_rendering_active_ = activated; | 926 is_gpu_rendering_active_ = activated; |
| 927 #if defined(OS_MACOSX) |
| 928 if (old_state != is_gpu_rendering_active_ && view_) |
| 929 view_->GpuRenderingStateDidChange(); |
| 930 #endif |
| 924 } | 931 } |
| 925 | 932 |
| 926 #if defined(OS_MACOSX) | 933 #if defined(OS_MACOSX) |
| 927 | 934 |
| 928 void RenderWidgetHost::OnMsgShowPopup( | 935 void RenderWidgetHost::OnMsgShowPopup( |
| 929 const ViewHostMsg_ShowPopup_Params& params) { | 936 const ViewHostMsg_ShowPopup_Params& params) { |
| 930 view_->ShowPopupWithItems(params.bounds, | 937 view_->ShowPopupWithItems(params.bounds, |
| 931 params.item_height, | 938 params.item_height, |
| 932 params.item_font_size, | 939 params.item_font_size, |
| 933 params.selected_item, | 940 params.selected_item, |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 // of this key event. | 1182 // of this key event. |
| 1176 if (!processed && !is_hidden_ && !front_item.skip_in_browser) { | 1183 if (!processed && !is_hidden_ && !front_item.skip_in_browser) { |
| 1177 UnhandledKeyboardEvent(front_item); | 1184 UnhandledKeyboardEvent(front_item); |
| 1178 | 1185 |
| 1179 // WARNING: This RenderWidgetHost can be deallocated at this point | 1186 // WARNING: This RenderWidgetHost can be deallocated at this point |
| 1180 // (i.e. in the case of Ctrl+W, where the call to | 1187 // (i.e. in the case of Ctrl+W, where the call to |
| 1181 // UnhandledKeyboardEvent destroys this RenderWidgetHost). | 1188 // UnhandledKeyboardEvent destroys this RenderWidgetHost). |
| 1182 } | 1189 } |
| 1183 } | 1190 } |
| 1184 } | 1191 } |
| OLD | NEW |