| 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_mac.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
| 6 | 6 |
| 7 #import <Carbon/Carbon.h> | 7 #import <Carbon/Carbon.h> |
| 8 #import <objc/runtime.h> | 8 #import <objc/runtime.h> |
| 9 #include <OpenGL/gl.h> | 9 #include <OpenGL/gl.h> |
| 10 #include <QuartzCore/QuartzCore.h> | 10 #include <QuartzCore/QuartzCore.h> |
| (...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 transformed_point)) | 1572 transformed_point)) |
| 1573 return false; | 1573 return false; |
| 1574 *transformed_point = gfx::ConvertPointToDIP(scale_factor, *transformed_point); | 1574 *transformed_point = gfx::ConvertPointToDIP(scale_factor, *transformed_point); |
| 1575 return true; | 1575 return true; |
| 1576 } | 1576 } |
| 1577 | 1577 |
| 1578 bool RenderWidgetHostViewMac::TransformPointToCoordSpaceForView( | 1578 bool RenderWidgetHostViewMac::TransformPointToCoordSpaceForView( |
| 1579 const gfx::Point& point, | 1579 const gfx::Point& point, |
| 1580 RenderWidgetHostViewBase* target_view, | 1580 RenderWidgetHostViewBase* target_view, |
| 1581 gfx::Point* transformed_point) { | 1581 gfx::Point* transformed_point) { |
| 1582 if (target_view == this) { |
| 1583 *transformed_point = point; |
| 1584 return true; |
| 1585 } |
| 1586 |
| 1582 return browser_compositor_->GetDelegatedFrameHost() | 1587 return browser_compositor_->GetDelegatedFrameHost() |
| 1583 ->TransformPointToCoordSpaceForView(point, target_view, | 1588 ->TransformPointToCoordSpaceForView(point, target_view, |
| 1584 transformed_point); | 1589 transformed_point); |
| 1585 } | 1590 } |
| 1586 | 1591 |
| 1587 bool RenderWidgetHostViewMac::Send(IPC::Message* message) { | 1592 bool RenderWidgetHostViewMac::Send(IPC::Message* message) { |
| 1588 if (render_widget_host_) | 1593 if (render_widget_host_) |
| 1589 return render_widget_host_->Send(message); | 1594 return render_widget_host_->Send(message); |
| 1590 delete message; | 1595 delete message; |
| 1591 return false; | 1596 return false; |
| (...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3438 | 3443 |
| 3439 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3444 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3440 // regions that are not draggable. (See ControlRegionView in | 3445 // regions that are not draggable. (See ControlRegionView in |
| 3441 // native_app_window_cocoa.mm). This requires the render host view to be | 3446 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3442 // draggable by default. | 3447 // draggable by default. |
| 3443 - (BOOL)mouseDownCanMoveWindow { | 3448 - (BOOL)mouseDownCanMoveWindow { |
| 3444 return YES; | 3449 return YES; |
| 3445 } | 3450 } |
| 3446 | 3451 |
| 3447 @end | 3452 @end |
| OLD | NEW |