OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he
lper.h" |
| 6 |
5 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
6 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he
lper.h" | |
7 #import "content/browser/renderer_host/render_widget_host_view_mac.h" | 8 #import "content/browser/renderer_host/render_widget_host_view_mac.h" |
8 | 9 |
9 namespace content { | 10 namespace content { |
10 | 11 |
11 RenderWidgetHostViewMacDictionaryHelper:: | 12 RenderWidgetHostViewMacDictionaryHelper:: |
12 RenderWidgetHostViewMacDictionaryHelper(RenderWidgetHostView* view) | 13 RenderWidgetHostViewMacDictionaryHelper(RenderWidgetHostView* view) |
13 : view_(static_cast<RenderWidgetHostViewMac*>(view)), | 14 : view_(static_cast<RenderWidgetHostViewMac*>(view)), |
14 target_view_(static_cast<RenderWidgetHostViewMac*>(view)) { | 15 target_view_(static_cast<RenderWidgetHostViewMac*>(view)) { |
15 } | 16 } |
16 | 17 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 rect.origin.y += NSHeight(rect) - [font ascender]; | 50 rect.origin.y += NSHeight(rect) - [font ascender]; |
50 | 51 |
51 rect.origin.x += offset_.x(); | 52 rect.origin.x += offset_.x(); |
52 rect.origin.y += offset_.y(); | 53 rect.origin.y += offset_.y(); |
53 | 54 |
54 [target_view_->cocoa_view() showDefinitionForAttributedString:attr_string | 55 [target_view_->cocoa_view() showDefinitionForAttributedString:attr_string |
55 atPoint:rect.origin]; | 56 atPoint:rect.origin]; |
56 } | 57 } |
57 | 58 |
58 } // namespace content | 59 } // namespace content |
OLD | NEW |