| 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 <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 #include "ui/wm/public/tooltip_client.h" | 95 #include "ui/wm/public/tooltip_client.h" |
| 96 #include "ui/wm/public/transient_window_client.h" | 96 #include "ui/wm/public/transient_window_client.h" |
| 97 #include "ui/wm/public/window_types.h" | 97 #include "ui/wm/public/window_types.h" |
| 98 | 98 |
| 99 #if defined(OS_WIN) | 99 #if defined(OS_WIN) |
| 100 #include "content/browser/accessibility/browser_accessibility_manager_win.h" | 100 #include "content/browser/accessibility/browser_accessibility_manager_win.h" |
| 101 #include "content/browser/accessibility/browser_accessibility_win.h" | 101 #include "content/browser/accessibility/browser_accessibility_win.h" |
| 102 #include "content/browser/renderer_host/legacy_render_widget_host_win.h" | 102 #include "content/browser/renderer_host/legacy_render_widget_host_win.h" |
| 103 #include "content/common/plugin_constants_win.h" | 103 #include "content/common/plugin_constants_win.h" |
| 104 #include "ui/base/win/hidden_window.h" | 104 #include "ui/base/win/hidden_window.h" |
| 105 #include "ui/display/win/screen_win.h" | |
| 106 #include "ui/gfx/gdi_util.h" | 105 #include "ui/gfx/gdi_util.h" |
| 106 #include "ui/gfx/screen_win.h" |
| 107 #include "ui/gfx/win/dpi.h" | 107 #include "ui/gfx/win/dpi.h" |
| 108 #endif | 108 #endif |
| 109 | 109 |
| 110 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 110 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 111 #include "content/common/input_messages.h" | 111 #include "content/common/input_messages.h" |
| 112 #include "ui/events/linux/text_edit_command_auralinux.h" | 112 #include "ui/events/linux/text_edit_command_auralinux.h" |
| 113 #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h" | 113 #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h" |
| 114 #endif | 114 #endif |
| 115 | 115 |
| 116 using gfx::RectToSkIRect; | 116 using gfx::RectToSkIRect; |
| (...skipping 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2412 // On Windows we may fail to retrieve the aura Window at the current cursor | 2412 // On Windows we may fail to retrieve the aura Window at the current cursor |
| 2413 // position. This is because the WindowFromPoint API may return the legacy | 2413 // position. This is because the WindowFromPoint API may return the legacy |
| 2414 // window which is not associated with an aura Window. In this case we need | 2414 // window which is not associated with an aura Window. In this case we need |
| 2415 // to get the aura window for the parent of the legacy window. | 2415 // to get the aura window for the parent of the legacy window. |
| 2416 if (!window_at_screen_point && legacy_render_widget_host_HWND_) { | 2416 if (!window_at_screen_point && legacy_render_widget_host_HWND_) { |
| 2417 HWND hwnd_at_point = ::WindowFromPoint(cursor_screen_point.ToPOINT()); | 2417 HWND hwnd_at_point = ::WindowFromPoint(cursor_screen_point.ToPOINT()); |
| 2418 | 2418 |
| 2419 if (hwnd_at_point == legacy_render_widget_host_HWND_->hwnd()) | 2419 if (hwnd_at_point == legacy_render_widget_host_HWND_->hwnd()) |
| 2420 hwnd_at_point = legacy_render_widget_host_HWND_->GetParent(); | 2420 hwnd_at_point = legacy_render_widget_host_HWND_->GetParent(); |
| 2421 | 2421 |
| 2422 display::win::ScreenWin* screen_win = | 2422 gfx::ScreenWin* screen_win = static_cast<gfx::ScreenWin*>(screen); |
| 2423 static_cast<display::win::ScreenWin*>(screen); | 2423 DCHECK(screen_win); |
| 2424 window_at_screen_point = screen_win->GetNativeWindowFromHWND( | 2424 window_at_screen_point = screen_win->GetNativeWindowFromHWND( |
| 2425 hwnd_at_point); | 2425 hwnd_at_point); |
| 2426 } | 2426 } |
| 2427 #endif | 2427 #endif |
| 2428 if (!window_at_screen_point || | 2428 if (!window_at_screen_point || |
| 2429 (window_at_screen_point->GetRootWindow() != root_window)) { | 2429 (window_at_screen_point->GetRootWindow() != root_window)) { |
| 2430 return; | 2430 return; |
| 2431 } | 2431 } |
| 2432 #endif | 2432 #endif |
| 2433 | 2433 |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2941 | 2941 |
| 2942 //////////////////////////////////////////////////////////////////////////////// | 2942 //////////////////////////////////////////////////////////////////////////////// |
| 2943 // RenderWidgetHostViewBase, public: | 2943 // RenderWidgetHostViewBase, public: |
| 2944 | 2944 |
| 2945 // static | 2945 // static |
| 2946 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2946 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2947 GetScreenInfoForWindow(results, NULL); | 2947 GetScreenInfoForWindow(results, NULL); |
| 2948 } | 2948 } |
| 2949 | 2949 |
| 2950 } // namespace content | 2950 } // namespace content |
| OLD | NEW |