| 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 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 // the view hierarchy because the tab isn't main. Could retrieve | 1453 // the view hierarchy because the tab isn't main. Could retrieve |
| 1454 // the information from the main tab for our window. | 1454 // the information from the main tab for our window. |
| 1455 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_); | 1455 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_); |
| 1456 if (!enclosing_window) | 1456 if (!enclosing_window) |
| 1457 return gfx::Rect(); | 1457 return gfx::Rect(); |
| 1458 | 1458 |
| 1459 NSRect bounds = [enclosing_window frame]; | 1459 NSRect bounds = [enclosing_window frame]; |
| 1460 return FlipNSRectToRectScreen(bounds); | 1460 return FlipNSRectToRectScreen(bounds); |
| 1461 } | 1461 } |
| 1462 | 1462 |
| 1463 void RenderWidgetHostViewMac::LockCompositingSurface() { | |
| 1464 NOTIMPLEMENTED(); | |
| 1465 } | |
| 1466 | |
| 1467 void RenderWidgetHostViewMac::UnlockCompositingSurface() { | |
| 1468 NOTIMPLEMENTED(); | |
| 1469 } | |
| 1470 | |
| 1471 bool RenderWidgetHostViewMac::LockMouse() { | 1463 bool RenderWidgetHostViewMac::LockMouse() { |
| 1472 if (mouse_locked_) | 1464 if (mouse_locked_) |
| 1473 return true; | 1465 return true; |
| 1474 | 1466 |
| 1475 mouse_locked_ = true; | 1467 mouse_locked_ = true; |
| 1476 | 1468 |
| 1477 // Lock position of mouse cursor and hide it. | 1469 // Lock position of mouse cursor and hide it. |
| 1478 CGAssociateMouseAndMouseCursorPosition(NO); | 1470 CGAssociateMouseAndMouseCursorPosition(NO); |
| 1479 [NSCursor hide]; | 1471 [NSCursor hide]; |
| 1480 | 1472 |
| (...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3462 | 3454 |
| 3463 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3455 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3464 // regions that are not draggable. (See ControlRegionView in | 3456 // regions that are not draggable. (See ControlRegionView in |
| 3465 // native_app_window_cocoa.mm). This requires the render host view to be | 3457 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3466 // draggable by default. | 3458 // draggable by default. |
| 3467 - (BOOL)mouseDownCanMoveWindow { | 3459 - (BOOL)mouseDownCanMoveWindow { |
| 3468 return YES; | 3460 return YES; |
| 3469 } | 3461 } |
| 3470 | 3462 |
| 3471 @end | 3463 @end |
| OLD | NEW |