| 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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 | 587 |
| 588 void RenderWidgetHostViewMac::SetDelegate( | 588 void RenderWidgetHostViewMac::SetDelegate( |
| 589 NSObject<RenderWidgetHostViewMacDelegate>* delegate) { | 589 NSObject<RenderWidgetHostViewMacDelegate>* delegate) { |
| 590 [cocoa_view_ setResponderDelegate:delegate]; | 590 [cocoa_view_ setResponderDelegate:delegate]; |
| 591 } | 591 } |
| 592 | 592 |
| 593 void RenderWidgetHostViewMac::SetAllowPauseForResizeOrRepaint(bool allow) { | 593 void RenderWidgetHostViewMac::SetAllowPauseForResizeOrRepaint(bool allow) { |
| 594 allow_pause_for_resize_or_repaint_ = allow; | 594 allow_pause_for_resize_or_repaint_ = allow; |
| 595 } | 595 } |
| 596 | 596 |
| 597 cc::SurfaceId RenderWidgetHostViewMac::SurfaceIdForTesting() const { |
| 598 return delegated_frame_host_->SurfaceIdForTesting(); |
| 599 } |
| 600 |
| 597 /////////////////////////////////////////////////////////////////////////////// | 601 /////////////////////////////////////////////////////////////////////////////// |
| 598 // RenderWidgetHostViewMac, RenderWidgetHostView implementation: | 602 // RenderWidgetHostViewMac, RenderWidgetHostView implementation: |
| 599 | 603 |
| 600 void RenderWidgetHostViewMac::EnsureBrowserCompositorView() { | 604 void RenderWidgetHostViewMac::EnsureBrowserCompositorView() { |
| 601 TRACE_EVENT0("browser", | 605 TRACE_EVENT0("browser", |
| 602 "RenderWidgetHostViewMac::EnsureBrowserCompositorView"); | 606 "RenderWidgetHostViewMac::EnsureBrowserCompositorView"); |
| 603 | 607 |
| 604 // Create the view, to transition from Destroyed -> Suspended. | 608 // Create the view, to transition from Destroyed -> Suspended. |
| 605 if (browser_compositor_state_ == BrowserCompositorDestroyed) { | 609 if (browser_compositor_state_ == BrowserCompositorDestroyed) { |
| 606 browser_compositor_ = BrowserCompositorMac::Create(); | 610 browser_compositor_ = BrowserCompositorMac::Create(); |
| (...skipping 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3445 | 3449 |
| 3446 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3450 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3447 // regions that are not draggable. (See ControlRegionView in | 3451 // regions that are not draggable. (See ControlRegionView in |
| 3448 // native_app_window_cocoa.mm). This requires the render host view to be | 3452 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3449 // draggable by default. | 3453 // draggable by default. |
| 3450 - (BOOL)mouseDownCanMoveWindow { | 3454 - (BOOL)mouseDownCanMoveWindow { |
| 3451 return YES; | 3455 return YES; |
| 3452 } | 3456 } |
| 3453 | 3457 |
| 3454 @end | 3458 @end |
| OLD | NEW |