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 <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2160 window_->parent()->delegate()->OnMouseEvent(event); | 2160 window_->parent()->delegate()->OnMouseEvent(event); |
| 2161 } | 2161 } |
| 2162 | 2162 |
| 2163 if (!IsXButtonUpEvent(event)) | 2163 if (!IsXButtonUpEvent(event)) |
| 2164 event->SetHandled(); | 2164 event->SetHandled(); |
| 2165 } | 2165 } |
| 2166 | 2166 |
| 2167 uint32_t RenderWidgetHostViewAura::SurfaceIdNamespaceAtPoint( | 2167 uint32_t RenderWidgetHostViewAura::SurfaceIdNamespaceAtPoint( |
| 2168 const gfx::Point& point, | 2168 const gfx::Point& point, |
| 2169 gfx::Point* transformed_point) { | 2169 gfx::Point* transformed_point) { |
| 2170 cc::SurfaceId id = | 2170 aura::WindowTreeHost* host = window_->GetHost(); |
| 2171 delegated_frame_host_->SurfaceIdAtPoint(point, transformed_point); | 2171 gfx::Point point_in_pixels(point); |
| 2172 host->GetRootTransform().TransformPoint(&point_in_pixels); | |
|
sadrul
2015/09/11 17:48:10
Does this do the right thing when the display is r
| |
| 2173 cc::SurfaceId id = delegated_frame_host_->SurfaceIdAtPoint(point_in_pixels, | |
| 2174 transformed_point); | |
| 2175 host->GetInverseRootTransform().TransformPoint(transformed_point); | |
| 2176 | |
| 2172 // It is possible that the renderer has not yet produced a surface, in which | 2177 // It is possible that the renderer has not yet produced a surface, in which |
| 2173 // case we return our current namespace. | 2178 // case we return our current namespace. |
| 2174 if (id.is_null()) | 2179 if (id.is_null()) |
| 2175 return GetSurfaceIdNamespace(); | 2180 return GetSurfaceIdNamespace(); |
| 2176 return cc::SurfaceIdAllocator::NamespaceForId(id); | 2181 return cc::SurfaceIdAllocator::NamespaceForId(id); |
| 2177 } | 2182 } |
| 2178 | 2183 |
| 2179 void RenderWidgetHostViewAura::ProcessMouseEvent( | 2184 void RenderWidgetHostViewAura::ProcessMouseEvent( |
| 2180 const blink::WebMouseEvent& event) { | 2185 const blink::WebMouseEvent& event) { |
| 2181 host_->ForwardMouseEvent(event); | 2186 host_->ForwardMouseEvent(event); |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2882 | 2887 |
| 2883 //////////////////////////////////////////////////////////////////////////////// | 2888 //////////////////////////////////////////////////////////////////////////////// |
| 2884 // RenderWidgetHostViewBase, public: | 2889 // RenderWidgetHostViewBase, public: |
| 2885 | 2890 |
| 2886 // static | 2891 // static |
| 2887 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2892 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2888 GetScreenInfoForWindow(results, NULL); | 2893 GetScreenInfoForWindow(results, NULL); |
| 2889 } | 2894 } |
| 2890 | 2895 |
| 2891 } // namespace content | 2896 } // namespace content |
| OLD | NEW |