Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 300323005: Route selection bounds updates through the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <QuartzCore/QuartzCore.h> 8 #include <QuartzCore/QuartzCore.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 if (![cocoa_view_ hasMarkedText]) { 1181 if (![cocoa_view_ hasMarkedText]) {
1182 [cocoa_view_ setMarkedRange:range.ToNSRange()]; 1182 [cocoa_view_ setMarkedRange:range.ToNSRange()];
1183 } 1183 }
1184 1184
1185 RenderWidgetHostViewBase::SelectionChanged(text, offset, range); 1185 RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
1186 } 1186 }
1187 1187
1188 void RenderWidgetHostViewMac::SelectionBoundsChanged( 1188 void RenderWidgetHostViewMac::SelectionBoundsChanged(
1189 const ViewHostMsg_SelectionBounds_Params& params) { 1189 const ViewHostMsg_SelectionBounds_Params& params) {
1190 if (params.anchor_rect == params.focus_rect) 1190 if (params.anchor_rect == params.focus_rect)
1191 caret_rect_ = params.anchor_rect; 1191 caret_rect_ = gfx::ToEnclosinRect(params.anchor_rect);
1192 } 1192 }
1193 1193
1194 void RenderWidgetHostViewMac::ScrollOffsetChanged() { 1194 void RenderWidgetHostViewMac::ScrollOffsetChanged() {
1195 } 1195 }
1196 1196
1197 void RenderWidgetHostViewMac::SetShowingContextMenu(bool showing) { 1197 void RenderWidgetHostViewMac::SetShowingContextMenu(bool showing) {
1198 RenderWidgetHostViewBase::SetShowingContextMenu(showing); 1198 RenderWidgetHostViewBase::SetShowingContextMenu(showing);
1199 1199
1200 // Create a fake mouse event to inform the render widget that the mouse 1200 // Create a fake mouse event to inform the render widget that the mouse
1201 // left or entered. 1201 // left or entered.
(...skipping 3178 matching lines...) Expand 10 before | Expand all | Expand 10 after
4380 4380
4381 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 4381 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
4382 // regions that are not draggable. (See ControlRegionView in 4382 // regions that are not draggable. (See ControlRegionView in
4383 // native_app_window_cocoa.mm). This requires the render host view to be 4383 // native_app_window_cocoa.mm). This requires the render host view to be
4384 // draggable by default. 4384 // draggable by default.
4385 - (BOOL)mouseDownCanMoveWindow { 4385 - (BOOL)mouseDownCanMoveWindow {
4386 return YES; 4386 return YES;
4387 } 4387 }
4388 4388
4389 @end 4389 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698