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 "app/keyboard_codes.h" | 7 #include "app/keyboard_codes.h" |
8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 } | 946 } |
947 | 947 |
948 void RenderWidgetHost::OnMsgGpuRenderingActivated(bool activated) { | 948 void RenderWidgetHost::OnMsgGpuRenderingActivated(bool activated) { |
949 #if defined(OS_MACOSX) | 949 #if defined(OS_MACOSX) |
950 bool old_state = is_gpu_rendering_active_; | 950 bool old_state = is_gpu_rendering_active_; |
951 #endif | 951 #endif |
952 is_gpu_rendering_active_ = activated; | 952 is_gpu_rendering_active_ = activated; |
953 #if defined(OS_MACOSX) | 953 #if defined(OS_MACOSX) |
954 if (old_state != is_gpu_rendering_active_ && view_) | 954 if (old_state != is_gpu_rendering_active_ && view_) |
955 view_->GpuRenderingStateDidChange(); | 955 view_->GpuRenderingStateDidChange(); |
| 956 #elif defined(TOOLKIT_USES_GTK) |
| 957 view_->GpuRenderingActivated(activated); |
956 #endif | 958 #endif |
957 } | 959 } |
958 | 960 |
959 #if defined(OS_MACOSX) | 961 #if defined(OS_MACOSX) |
960 | 962 |
961 void RenderWidgetHost::OnMsgGetScreenInfo(gfx::NativeViewId view, | 963 void RenderWidgetHost::OnMsgGetScreenInfo(gfx::NativeViewId view, |
962 WebScreenInfo* results) { | 964 WebScreenInfo* results) { |
963 gfx::NativeView native_view = view_ ? view_->GetNativeView() : NULL; | 965 gfx::NativeView native_view = view_ ? view_->GetNativeView() : NULL; |
964 *results = WebScreenInfoFactory::screenInfo(native_view); | 966 *results = WebScreenInfoFactory::screenInfo(native_view); |
965 } | 967 } |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 // of this key event. | 1171 // of this key event. |
1170 if (!processed && !is_hidden_ && !front_item.skip_in_browser) { | 1172 if (!processed && !is_hidden_ && !front_item.skip_in_browser) { |
1171 UnhandledKeyboardEvent(front_item); | 1173 UnhandledKeyboardEvent(front_item); |
1172 | 1174 |
1173 // WARNING: This RenderWidgetHost can be deallocated at this point | 1175 // WARNING: This RenderWidgetHost can be deallocated at this point |
1174 // (i.e. in the case of Ctrl+W, where the call to | 1176 // (i.e. in the case of Ctrl+W, where the call to |
1175 // UnhandledKeyboardEvent destroys this RenderWidgetHost). | 1177 // UnhandledKeyboardEvent destroys this RenderWidgetHost). |
1176 } | 1178 } |
1177 } | 1179 } |
1178 } | 1180 } |
OLD | NEW |