| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 // webcontents. This will be passed as the container window for windowless | 981 // webcontents. This will be passed as the container window for windowless |
| 982 // plugins. | 982 // plugins. |
| 983 // Plugins like Flash assume the container window which is returned via the | 983 // Plugins like Flash assume the container window which is returned via the |
| 984 // NPNVnetscapeWindow property corresponds to the bounds of the webpage. | 984 // NPNVnetscapeWindow property corresponds to the bounds of the webpage. |
| 985 // This is not true in Aura where we have only HWND which is the main Aura | 985 // This is not true in Aura where we have only HWND which is the main Aura |
| 986 // window. If we return this window to plugins like Flash then it causes the | 986 // window. If we return this window to plugins like Flash then it causes the |
| 987 // coordinate translations done by these plugins to break. | 987 // coordinate translations done by these plugins to break. |
| 988 // Additonally the legacy dummy window is needed for accessibility and for | 988 // Additonally the legacy dummy window is needed for accessibility and for |
| 989 // scrolling to work in legacy drivers for trackpoints/trackpads, etc. | 989 // scrolling to work in legacy drivers for trackpoints/trackpads, etc. |
| 990 if (GetNativeViewId()) { | 990 if (GetNativeViewId()) { |
| 991 bool show_legacy_window = false; | |
| 992 if (!legacy_render_widget_host_HWND_) { | 991 if (!legacy_render_widget_host_HWND_) { |
| 993 legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create( | 992 legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create( |
| 994 reinterpret_cast<HWND>(GetNativeViewId())); | 993 reinterpret_cast<HWND>(GetNativeViewId())); |
| 995 show_legacy_window = window_->TargetVisibility(); | |
| 996 } | 994 } |
| 997 if (legacy_render_widget_host_HWND_) { | 995 if (legacy_render_widget_host_HWND_) { |
| 998 legacy_render_widget_host_HWND_->SetBounds( | 996 legacy_render_widget_host_HWND_->SetBounds( |
| 999 window_->GetBoundsInRootWindow()); | 997 window_->GetBoundsInRootWindow()); |
| 1000 if (show_legacy_window) | |
| 1001 legacy_render_widget_host_HWND_->Show(); | |
| 1002 } | 998 } |
| 1003 } | 999 } |
| 1004 | 1000 |
| 1005 if (mouse_locked_) | 1001 if (mouse_locked_) |
| 1006 UpdateMouseLockRegion(); | 1002 UpdateMouseLockRegion(); |
| 1007 #endif | 1003 #endif |
| 1008 } | 1004 } |
| 1009 | 1005 |
| 1010 #if defined(OS_WIN) | 1006 #if defined(OS_WIN) |
| 1011 bool RenderWidgetHostViewAura::UsesNativeWindowFrame() const { | 1007 bool RenderWidgetHostViewAura::UsesNativeWindowFrame() const { |
| (...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2379 | 2375 |
| 2380 //////////////////////////////////////////////////////////////////////////////// | 2376 //////////////////////////////////////////////////////////////////////////////// |
| 2381 // RenderWidgetHostViewBase, public: | 2377 // RenderWidgetHostViewBase, public: |
| 2382 | 2378 |
| 2383 // static | 2379 // static |
| 2384 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2380 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2385 GetScreenInfoForWindow(results, NULL); | 2381 GetScreenInfoForWindow(results, NULL); |
| 2386 } | 2382 } |
| 2387 | 2383 |
| 2388 } // namespace content | 2384 } // namespace content |
| OLD | NEW |