| 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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) { | 1262 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) { |
| 1263 DCHECK(delegated_frame_host_); | 1263 DCHECK(delegated_frame_host_); |
| 1264 delegated_frame_host_->BeginFrameSubscription(std::move(subscriber)); | 1264 delegated_frame_host_->BeginFrameSubscription(std::move(subscriber)); |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 void RenderWidgetHostViewMac::EndFrameSubscription() { | 1267 void RenderWidgetHostViewMac::EndFrameSubscription() { |
| 1268 DCHECK(delegated_frame_host_); | 1268 DCHECK(delegated_frame_host_); |
| 1269 delegated_frame_host_->EndFrameSubscription(); | 1269 delegated_frame_host_->EndFrameSubscription(); |
| 1270 } | 1270 } |
| 1271 | 1271 |
| 1272 ui::AcceleratedWidgetMac* RenderWidgetHostViewMac::GetAcceleratedWidgetMac() |
| 1273 const { |
| 1274 if (browser_compositor_) |
| 1275 return browser_compositor_->accelerated_widget_mac(); |
| 1276 return nullptr; |
| 1277 } |
| 1278 |
| 1272 void RenderWidgetHostViewMac::ForwardMouseEvent(const WebMouseEvent& event) { | 1279 void RenderWidgetHostViewMac::ForwardMouseEvent(const WebMouseEvent& event) { |
| 1273 if (render_widget_host_) | 1280 if (render_widget_host_) |
| 1274 render_widget_host_->ForwardMouseEvent(event); | 1281 render_widget_host_->ForwardMouseEvent(event); |
| 1275 | 1282 |
| 1276 if (event.type == WebInputEvent::MouseLeave) { | 1283 if (event.type == WebInputEvent::MouseLeave) { |
| 1277 [cocoa_view_ setToolTipAtMousePoint:nil]; | 1284 [cocoa_view_ setToolTipAtMousePoint:nil]; |
| 1278 tooltip_text_.clear(); | 1285 tooltip_text_.clear(); |
| 1279 } | 1286 } |
| 1280 } | 1287 } |
| 1281 | 1288 |
| (...skipping 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3407 | 3414 |
| 3408 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3415 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3409 // regions that are not draggable. (See ControlRegionView in | 3416 // regions that are not draggable. (See ControlRegionView in |
| 3410 // native_app_window_cocoa.mm). This requires the render host view to be | 3417 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3411 // draggable by default. | 3418 // draggable by default. |
| 3412 - (BOOL)mouseDownCanMoveWindow { | 3419 - (BOOL)mouseDownCanMoveWindow { |
| 3413 return YES; | 3420 return YES; |
| 3414 } | 3421 } |
| 3415 | 3422 |
| 3416 @end | 3423 @end |
| OLD | NEW |