| 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 | 10 |
| (...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 | 1360 |
| 1361 return gfx::Range( | 1361 return gfx::Range( |
| 1362 request_range.start() - composition_range_.start(), | 1362 request_range.start() - composition_range_.start(), |
| 1363 request_range.end() - composition_range_.start()); | 1363 request_range.end() - composition_range_.start()); |
| 1364 } | 1364 } |
| 1365 | 1365 |
| 1366 WebContents* RenderWidgetHostViewMac::GetWebContents() { | 1366 WebContents* RenderWidgetHostViewMac::GetWebContents() { |
| 1367 if (!render_widget_host_->IsRenderView()) | 1367 if (!render_widget_host_->IsRenderView()) |
| 1368 return NULL; | 1368 return NULL; |
| 1369 | 1369 |
| 1370 return WebContents::FromRenderViewHost( | 1370 return WebContents::FromRenderFrameHost( |
| 1371 RenderViewHost::From(render_widget_host_)); | 1371 RenderViewHost::From(render_widget_host_)->GetMainFrame()); |
| 1372 } | 1372 } |
| 1373 | 1373 |
| 1374 bool RenderWidgetHostViewMac::GetCachedFirstRectForCharacterRange( | 1374 bool RenderWidgetHostViewMac::GetCachedFirstRectForCharacterRange( |
| 1375 NSRange range, | 1375 NSRange range, |
| 1376 NSRect* rect, | 1376 NSRect* rect, |
| 1377 NSRange* actual_range) { | 1377 NSRange* actual_range) { |
| 1378 DCHECK(rect); | 1378 DCHECK(rect); |
| 1379 // This exists to make IMEs more responsive, see http://crbug.com/115920 | 1379 // This exists to make IMEs more responsive, see http://crbug.com/115920 |
| 1380 TRACE_EVENT0("browser", | 1380 TRACE_EVENT0("browser", |
| 1381 "RenderWidgetHostViewMac::GetFirstRectForCharacterRange"); | 1381 "RenderWidgetHostViewMac::GetFirstRectForCharacterRange"); |
| (...skipping 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3371 | 3371 |
| 3372 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3372 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3373 // regions that are not draggable. (See ControlRegionView in | 3373 // regions that are not draggable. (See ControlRegionView in |
| 3374 // native_app_window_cocoa.mm). This requires the render host view to be | 3374 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3375 // draggable by default. | 3375 // draggable by default. |
| 3376 - (BOOL)mouseDownCanMoveWindow { | 3376 - (BOOL)mouseDownCanMoveWindow { |
| 3377 return YES; | 3377 return YES; |
| 3378 } | 3378 } |
| 3379 | 3379 |
| 3380 @end | 3380 @end |
| OLD | NEW |