| 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 980 | 980 | 
| 981 void RenderWidgetHost::OnMsgDidActivateAcceleratedCompositing(bool activated) { | 981 void RenderWidgetHost::OnMsgDidActivateAcceleratedCompositing(bool activated) { | 
| 982 #if defined(OS_MACOSX) | 982 #if defined(OS_MACOSX) | 
| 983   bool old_state = is_accelerated_compositing_active_; | 983   bool old_state = is_accelerated_compositing_active_; | 
| 984 #endif | 984 #endif | 
| 985   is_accelerated_compositing_active_ = activated; | 985   is_accelerated_compositing_active_ = activated; | 
| 986 #if defined(OS_MACOSX) | 986 #if defined(OS_MACOSX) | 
| 987   if (old_state != is_accelerated_compositing_active_ && view_) | 987   if (old_state != is_accelerated_compositing_active_ && view_) | 
| 988     view_->GpuRenderingStateDidChange(); | 988     view_->GpuRenderingStateDidChange(); | 
| 989 #elif defined(OS_WIN) | 989 #elif defined(OS_WIN) | 
| 990   view_->ShowCompositorHostWindow(is_accelerated_compositing_active_); | 990   if (view_) | 
|  | 991     view_->ShowCompositorHostWindow(is_accelerated_compositing_active_); | 
| 991 #elif defined(TOOLKIT_USES_GTK) | 992 #elif defined(TOOLKIT_USES_GTK) | 
| 992   view_->AcceleratedCompositingActivated(activated); | 993   if (view_) | 
|  | 994     view_->AcceleratedCompositingActivated(activated); | 
| 993 #endif | 995 #endif | 
| 994 } | 996 } | 
| 995 | 997 | 
| 996 #if defined(OS_MACOSX) | 998 #if defined(OS_MACOSX) | 
| 997 | 999 | 
| 998 void RenderWidgetHost::OnMsgGetScreenInfo(gfx::NativeViewId view, | 1000 void RenderWidgetHost::OnMsgGetScreenInfo(gfx::NativeViewId view, | 
| 999                                           WebScreenInfo* results) { | 1001                                           WebScreenInfo* results) { | 
| 1000   gfx::NativeView native_view = view_ ? view_->GetNativeView() : NULL; | 1002   gfx::NativeView native_view = view_ ? view_->GetNativeView() : NULL; | 
| 1001   *results = WebScreenInfoFactory::screenInfo(native_view); | 1003   *results = WebScreenInfoFactory::screenInfo(native_view); | 
| 1002 } | 1004 } | 
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1209     // of this key event. | 1211     // of this key event. | 
| 1210     if (!processed && !is_hidden_ && !front_item.skip_in_browser) { | 1212     if (!processed && !is_hidden_ && !front_item.skip_in_browser) { | 
| 1211       UnhandledKeyboardEvent(front_item); | 1213       UnhandledKeyboardEvent(front_item); | 
| 1212 | 1214 | 
| 1213       // WARNING: This RenderWidgetHost can be deallocated at this point | 1215       // WARNING: This RenderWidgetHost can be deallocated at this point | 
| 1214       // (i.e.  in the case of Ctrl+W, where the call to | 1216       // (i.e.  in the case of Ctrl+W, where the call to | 
| 1215       // UnhandledKeyboardEvent destroys this RenderWidgetHost). | 1217       // UnhandledKeyboardEvent destroys this RenderWidgetHost). | 
| 1216     } | 1218     } | 
| 1217   } | 1219   } | 
| 1218 } | 1220 } | 
| OLD | NEW | 
|---|