| 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 <objc/runtime.h> | 7 #import <objc/runtime.h> |
| 8 #include <OpenGL/gl.h> | 8 #include <OpenGL/gl.h> |
| 9 #include <QuartzCore/QuartzCore.h> | 9 #include <QuartzCore/QuartzCore.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1643 // Do not touch any members at this point, |this| has been deleted. | 1643 // Do not touch any members at this point, |this| has been deleted. |
| 1644 } | 1644 } |
| 1645 | 1645 |
| 1646 void RenderWidgetHostViewMac::ShutdownBrowserCompositor() { | 1646 void RenderWidgetHostViewMac::ShutdownBrowserCompositor() { |
| 1647 DestroyBrowserCompositorView(); | 1647 DestroyBrowserCompositorView(); |
| 1648 delegated_frame_host_.reset(); | 1648 delegated_frame_host_.reset(); |
| 1649 root_layer_.reset(); | 1649 root_layer_.reset(); |
| 1650 browser_compositor_placeholder_.reset(); | 1650 browser_compositor_placeholder_.reset(); |
| 1651 } | 1651 } |
| 1652 | 1652 |
| 1653 gfx::NativeWindow RenderWidgetHostViewMac::CreateDetachedModeWindow() { |
| 1654 if (browser_compositor_) { |
| 1655 return browser_compositor_->accelerated_widget_mac() |
| 1656 ->CreateDetachedModeWindow(); |
| 1657 } |
| 1658 return nil; |
| 1659 } |
| 1660 |
| 1653 void RenderWidgetHostViewMac::SetActive(bool active) { | 1661 void RenderWidgetHostViewMac::SetActive(bool active) { |
| 1654 if (render_widget_host_) { | 1662 if (render_widget_host_) { |
| 1655 render_widget_host_->SetActive(active); | 1663 render_widget_host_->SetActive(active); |
| 1656 if (active) { | 1664 if (active) { |
| 1657 if (HasFocus()) | 1665 if (HasFocus()) |
| 1658 render_widget_host_->Focus(); | 1666 render_widget_host_->Focus(); |
| 1659 } else { | 1667 } else { |
| 1660 render_widget_host_->Blur(); | 1668 render_widget_host_->Blur(); |
| 1661 } | 1669 } |
| 1662 } | 1670 } |
| (...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3491 | 3499 |
| 3492 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3500 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3493 // regions that are not draggable. (See ControlRegionView in | 3501 // regions that are not draggable. (See ControlRegionView in |
| 3494 // native_app_window_cocoa.mm). This requires the render host view to be | 3502 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3495 // draggable by default. | 3503 // draggable by default. |
| 3496 - (BOOL)mouseDownCanMoveWindow { | 3504 - (BOOL)mouseDownCanMoveWindow { |
| 3497 return YES; | 3505 return YES; |
| 3498 } | 3506 } |
| 3499 | 3507 |
| 3500 @end | 3508 @end |
| OLD | NEW |