OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/views/cocoa/bridged_content_view.h" | 5 #import "ui/views/cocoa/bridged_content_view.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #import "base/mac/scoped_nsobject.h" | 8 #import "base/mac/scoped_nsobject.h" |
9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
10 #include "ui/base/ime/text_input_client.h" | 10 #include "ui/base/ime/text_input_client.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 - (void)copy:(id)sender; | 86 - (void)copy:(id)sender; |
87 - (void)paste:(id)sender; | 87 - (void)paste:(id)sender; |
88 - (void)selectAll:(id)sender; | 88 - (void)selectAll:(id)sender; |
89 | 89 |
90 @end | 90 @end |
91 | 91 |
92 @implementation BridgedContentView | 92 @implementation BridgedContentView |
93 | 93 |
94 @synthesize hostedView = hostedView_; | 94 @synthesize hostedView = hostedView_; |
95 @synthesize textInputClient = textInputClient_; | 95 @synthesize textInputClient = textInputClient_; |
| 96 @synthesize mouseDownCanMoveWindow = mouseDownCanMoveWindow_; |
96 | 97 |
97 - (id)initWithView:(views::View*)viewToHost { | 98 - (id)initWithView:(views::View*)viewToHost { |
98 DCHECK(viewToHost); | 99 DCHECK(viewToHost); |
99 gfx::Rect bounds = viewToHost->bounds(); | 100 gfx::Rect bounds = viewToHost->bounds(); |
100 // To keep things simple, assume the origin is (0, 0) until there exists a use | 101 // To keep things simple, assume the origin is (0, 0) until there exists a use |
101 // case for something other than that. | 102 // case for something other than that. |
102 DCHECK(bounds.origin().IsOrigin()); | 103 DCHECK(bounds.origin().IsOrigin()); |
103 NSRect initialFrame = NSMakeRect(0, 0, bounds.width(), bounds.height()); | 104 NSRect initialFrame = NSMakeRect(0, 0, bounds.width(), bounds.height()); |
104 if ((self = [super initWithFrame:initialFrame])) { | 105 if ((self = [super initWithFrame:initialFrame])) { |
105 hostedView_ = viewToHost; | 106 hostedView_ = viewToHost; |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 } | 706 } |
706 | 707 |
707 return [super accessibilityAttributeValue:attribute]; | 708 return [super accessibilityAttributeValue:attribute]; |
708 } | 709 } |
709 | 710 |
710 - (id)accessibilityHitTest:(NSPoint)point { | 711 - (id)accessibilityHitTest:(NSPoint)point { |
711 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; | 712 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; |
712 } | 713 } |
713 | 714 |
714 @end | 715 @end |
OLD | NEW |