Chromium Code Reviews| 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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 987 // webcontents. This will be passed as the container window for windowless | 987 // webcontents. This will be passed as the container window for windowless |
| 988 // plugins. | 988 // plugins. |
| 989 // Plugins like Flash assume the container window which is returned via the | 989 // Plugins like Flash assume the container window which is returned via the |
| 990 // NPNVnetscapeWindow property corresponds to the bounds of the webpage. | 990 // NPNVnetscapeWindow property corresponds to the bounds of the webpage. |
| 991 // This is not true in Aura where we have only HWND which is the main Aura | 991 // This is not true in Aura where we have only HWND which is the main Aura |
| 992 // window. If we return this window to plugins like Flash then it causes the | 992 // window. If we return this window to plugins like Flash then it causes the |
| 993 // coordinate translations done by these plugins to break. | 993 // coordinate translations done by these plugins to break. |
| 994 // Additonally the legacy dummy window is needed for accessibility and for | 994 // Additonally the legacy dummy window is needed for accessibility and for |
| 995 // scrolling to work in legacy drivers for trackpoints/trackpads, etc. | 995 // scrolling to work in legacy drivers for trackpoints/trackpads, etc. |
| 996 if (GetNativeViewId()) { | 996 if (GetNativeViewId()) { |
| 997 bool show_legacy_window = false; | |
| 997 if (!legacy_render_widget_host_HWND_) { | 998 if (!legacy_render_widget_host_HWND_) { |
| 998 legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create( | 999 legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create( |
| 999 reinterpret_cast<HWND>(GetNativeViewId())); | 1000 reinterpret_cast<HWND>(GetNativeViewId())); |
| 1001 show_legacy_window = window_->TargetVisibility(); | |
| 1000 } | 1002 } |
| 1001 if (legacy_render_widget_host_HWND_) { | 1003 if (legacy_render_widget_host_HWND_) { |
| 1002 legacy_render_widget_host_HWND_->SetBounds( | 1004 legacy_render_widget_host_HWND_->SetBounds( |
| 1003 window_->GetBoundsInRootWindow()); | 1005 window_->GetBoundsInRootWindow()); |
| 1006 if (show_legacy_window) { | |
| 1007 legacy_render_widget_host_HWND_->Show(); | |
|
Ben Goodger (Google)
2014/05/13 20:54:52
nit: no braces and 2-space indent only.
| |
| 1008 } | |
| 1004 } | 1009 } |
| 1005 } | 1010 } |
| 1006 | 1011 |
| 1007 if (mouse_locked_) | 1012 if (mouse_locked_) |
| 1008 UpdateMouseLockRegion(); | 1013 UpdateMouseLockRegion(); |
| 1009 #endif | 1014 #endif |
| 1010 } | 1015 } |
| 1011 | 1016 |
| 1012 #if defined(OS_WIN) | 1017 #if defined(OS_WIN) |
| 1013 bool RenderWidgetHostViewAura::UsesNativeWindowFrame() const { | 1018 bool RenderWidgetHostViewAura::UsesNativeWindowFrame() const { |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2382 | 2387 |
| 2383 //////////////////////////////////////////////////////////////////////////////// | 2388 //////////////////////////////////////////////////////////////////////////////// |
| 2384 // RenderWidgetHostViewBase, public: | 2389 // RenderWidgetHostViewBase, public: |
| 2385 | 2390 |
| 2386 // static | 2391 // static |
| 2387 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2392 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2388 GetScreenInfoForWindow(results, NULL); | 2393 GetScreenInfoForWindow(results, NULL); |
| 2389 } | 2394 } |
| 2390 | 2395 |
| 2391 } // namespace content | 2396 } // namespace content |
| OLD | NEW |