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" |
105 #include "ui/gfx/gdi_util.h" | 106 #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 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2403 // On Windows we may fail to retrieve the aura Window at the current cursor | 2403 // On Windows we may fail to retrieve the aura Window at the current cursor |
2404 // position. This is because the WindowFromPoint API may return the legacy | 2404 // position. This is because the WindowFromPoint API may return the legacy |
2405 // window which is not associated with an aura Window. In this case we need | 2405 // window which is not associated with an aura Window. In this case we need |
2406 // to get the aura window for the parent of the legacy window. | 2406 // to get the aura window for the parent of the legacy window. |
2407 if (!window_at_screen_point && legacy_render_widget_host_HWND_) { | 2407 if (!window_at_screen_point && legacy_render_widget_host_HWND_) { |
2408 HWND hwnd_at_point = ::WindowFromPoint(cursor_screen_point.ToPOINT()); | 2408 HWND hwnd_at_point = ::WindowFromPoint(cursor_screen_point.ToPOINT()); |
2409 | 2409 |
2410 if (hwnd_at_point == legacy_render_widget_host_HWND_->hwnd()) | 2410 if (hwnd_at_point == legacy_render_widget_host_HWND_->hwnd()) |
2411 hwnd_at_point = legacy_render_widget_host_HWND_->GetParent(); | 2411 hwnd_at_point = legacy_render_widget_host_HWND_->GetParent(); |
2412 | 2412 |
2413 gfx::ScreenWin* screen_win = static_cast<gfx::ScreenWin*>(screen); | 2413 display::win::ScreenWin* screen_win = |
2414 DCHECK(screen_win); | 2414 static_cast<display::win::ScreenWin*>(screen); |
2415 window_at_screen_point = screen_win->GetNativeWindowFromHWND( | 2415 window_at_screen_point = screen_win->GetNativeWindowFromHWND( |
2416 hwnd_at_point); | 2416 hwnd_at_point); |
2417 } | 2417 } |
2418 #endif | 2418 #endif |
2419 if (!window_at_screen_point || | 2419 if (!window_at_screen_point || |
2420 (window_at_screen_point->GetRootWindow() != root_window)) { | 2420 (window_at_screen_point->GetRootWindow() != root_window)) { |
2421 return; | 2421 return; |
2422 } | 2422 } |
2423 #endif | 2423 #endif |
2424 | 2424 |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2930 | 2930 |
2931 //////////////////////////////////////////////////////////////////////////////// | 2931 //////////////////////////////////////////////////////////////////////////////// |
2932 // RenderWidgetHostViewBase, public: | 2932 // RenderWidgetHostViewBase, public: |
2933 | 2933 |
2934 // static | 2934 // static |
2935 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2935 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2936 GetScreenInfoForWindow(results, NULL); | 2936 GetScreenInfoForWindow(results, NULL); |
2937 } | 2937 } |
2938 | 2938 |
2939 } // namespace content | 2939 } // namespace content |
OLD | NEW |